mirror of
https://github.com/openshift/source-to-image.git
synced 2026-02-05 12:44:54 +01:00
Refactor s2i Tests for ci-operator
* Isolate integration tests that don't require Docker * Add OWNERS file * Add make commands to run integration tests
This commit is contained in:
27
hack/test-docker.sh
Executable file
27
hack/test-docker.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
readonly S2I_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
s2i::cleanup() {
|
||||
echo
|
||||
echo "Complete"
|
||||
}
|
||||
|
||||
readonly img_count="$(docker images | grep -c sti_test/sti-fake || :)"
|
||||
|
||||
if [ "${img_count}" != "12" ]; then
|
||||
echo "Missing test images, run 'hack/build-test-images.sh' and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap s2i::cleanup EXIT SIGINT
|
||||
|
||||
echo
|
||||
echo "Running docker integration tests ..."
|
||||
echo
|
||||
|
||||
S2I_TIMEOUT="-timeout 600s" "${S2I_ROOT}/hack/test-go.sh" test/integration/docker -v -tags "integration" "${@:1}"
|
||||
20
hack/test-dockerfile.sh
Executable file
20
hack/test-dockerfile.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
readonly S2I_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
s2i::cleanup() {
|
||||
echo
|
||||
echo "Complete"
|
||||
}
|
||||
|
||||
trap s2i::cleanup EXIT SIGINT
|
||||
|
||||
echo
|
||||
echo "Running dockerfile integration tests ..."
|
||||
echo
|
||||
|
||||
S2I_TIMEOUT="-timeout 600s" "${S2I_ROOT}/hack/test-go.sh" test/integration/dockerfile -v -tags "integration" "${@:1}"
|
||||
@@ -6,22 +6,6 @@ set -o pipefail
|
||||
|
||||
readonly S2I_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
s2i::cleanup() {
|
||||
echo
|
||||
echo "Complete"
|
||||
}
|
||||
"${S2I_ROOT}/hack/test-docker.sh"
|
||||
"${S2I_ROOT}/hack/test-dockerfile.sh"
|
||||
|
||||
readonly img_count="$(docker images | grep -c sti_test/sti-fake || :)"
|
||||
|
||||
if [ "${img_count}" != "12" ]; then
|
||||
echo "Missing test images, run 'hack/build-test-images.sh' and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap s2i::cleanup EXIT SIGINT
|
||||
|
||||
echo
|
||||
echo "Running integration tests ..."
|
||||
echo
|
||||
|
||||
S2I_TIMEOUT="-timeout 600s" "${S2I_ROOT}/hack/test-go.sh" test/integration -v -tags 'integration' "${@:1}"
|
||||
|
||||
Reference in New Issue
Block a user