OpenShift Tests for the build and push

This patch fixes the broken buildconfig functional tests
This commit is contained in:
Anush Shetty 2017-06-22 15:36:39 +05:30
parent cf39f78435
commit de5cdfa6a2
5 changed files with 39 additions and 7 deletions

View File

@ -0,0 +1,3 @@
FROM busybox:1.26.2
RUN touch /test

View File

@ -0,0 +1,6 @@
version: "2"
services:
foo:
build: "./build"
command: sleep 100

View File

@ -201,7 +201,6 @@ function convert::kompose_up () {
fi
}
function convert::kompose_down () {
# Function for running 'kompose down'
# Usage: convert::kompose_down <docker_compose_file>

View File

@ -21,15 +21,26 @@ source $KOMPOSE_ROOT/script/test_in_openshift/lib.sh
convert::print_msg "Testing buildconfig on kompose"
docker_compose_file="${KOMPOSE_ROOT}/examples/buildconfig/docker-compose.yml"
docker_compose_file="${KOMPOSE_ROOT}/script/test_in_openshift/compose-files/buildconfig/docker-compose.yml"
# Run kompose up
convert::kompose_up $docker_compose_file
convert::print_msg "Running kompose up ..."
kompose up --provider=openshift --emptyvols -f $docker_compose_file --build build-config; exit_status=$?
if [ $exit_status -ne 0 ]; then
convert::print_fail "kompose up has failed\n"
exit 1
fi
# Check if the pods are up.
convert::kompose_up_check -p foo
# Kompose down for buildconfig fails being tracked at #382
convert::kompose_down $docker_compose_file
convert::print_msg "Running kompose down ..."
kompose down --provider=openshift -f $docker_compose_file; exit_status=$?
if [ $exit_status -ne 0 ]; then
convert::print_fail "kompose down has failed\n"
exit 1
fi
convert::kompose_down_check 2

View File

@ -24,12 +24,25 @@ convert::print_msg "Testing buildconfig dockerfile construct in kompose"
docker_compose_file="${KOMPOSE_ROOT}/script/test_in_openshift/compose-files/docker-compose-bc-dockerfile.yml"
# Run kompose up
convert::kompose_up $docker_compose_file
convert::print_msg "Running kompose up ..."
kompose up --provider=openshift --emptyvols -f $docker_compose_file --build build-config; exit_status=$?
if [ $exit_status -ne 0 ]; then
convert::print_fail "kompose up has failed\n"
exit 1
fi
# Check if the pods are up.
convert::kompose_up_check -p foo
# Kompose down for buildconfig fails being tracked at #382
# convert::kompose_down $docker_compose_file
convert::print_msg "Running kompose down ..."
kompose down --provider=openshift -f $docker_compose_file; exit_status=$?
if [ $exit_status -ne 0 ]; then
convert::print_fail "kompose down has failed\n"
exit 1
fi
# convert::kompose_down_check 2