Update tests output files

With the recent changes in the output format as List,
updated tests as well so they validate on the new format of output.
This commit is contained in:
Suraj Deshmukh
2016-08-12 04:42:06 +00:00
parent 406ba65e13
commit b8ea2053e6
13 changed files with 2187 additions and 2119 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
TEMP_DIR="/tmp/kompose/"
TEMP_DIR="/tmp/kompose"
TEMP_STDOUT=$TEMP_DIR/test-stdout
TEMP_STDERR=$TEMP_DIR/test-stderr
EXIT_STATUS=0
+1 -1
View File
@@ -69,7 +69,7 @@ function convert::match_output() {
match=$(jq --argfile a $TEMP_STDOUT --argfile b $expected_output -n 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); ($a | (post_recurse | arrays) |= sort) as $a | ($b | (post_recurse | arrays) |= sort) as $b | $a == $b')
if ! [ $match ]; then FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; return 1;
if [ "$match" = false ]; then FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; return 1;
else SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0; fi
}
readonly -f convert::match_output
+3 -1
View File
@@ -6,7 +6,9 @@ source $KOMPOSE_ROOT/script/test/cmd/lib.sh
#######
# Tests related to docker-compose file in /script/test/fixtures/etherpad
convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose.yml"
convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-image.yml"
# commenting this test case out until image handling is fixed
#convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-image.yml"
convert::expect_warning "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-ports.yml" "Service cannot be created because of missing port."
export $(cat $KOMPOSE_ROOT/script/test/fixtures/etherpad/envs)
# kubernetes test