network int test fix (#1197)

This commit is contained in:
Mudit Verma 2019-12-04 08:30:47 +05:30 committed by Hang Yan
parent 356c64890c
commit 7f4be2a34d
3 changed files with 12 additions and 13 deletions

View File

@ -880,18 +880,17 @@ cmd="kompose convert --stdout -j -f -"
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" $KOMPOSE_ROOT/script/test/fixtures/stdin/output-k8s.json > /tmp/output-k8s.json
cat $KOMPOSE_ROOT/script/test/fixtures/stdin/docker-compose.yaml | $cmd | diff /tmp/output-k8s.json -
# Network Translation compose
cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/network/docker-compose-v3.yaml convert --stdout -j"
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" $KOMPOSE_ROOT/script/test/fixtures/network/output-k8s.json > /tmp/output-k8s.json
convert::expect_success_and_warning "$cmd" "/tmp/output-k8s.json"
# OpenShift test
cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/network/docker-compose-v3.yaml convert --stdout -j"
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" $KOMPOSE_ROOT/script/test/fixtures/network/output-os.json > /tmp/output-os.json
convert::expect_success_and_warning "$cmd" "/tmp/output-os.json"
echo -e "\n"
go test -v github.com/kubernetes/kompose/script/test/cmd
rm /tmp/output-k8s.json /tmp/output-os.json
exit $EXIT_STATUS
# Network Translation compose v3
cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/network/docker-compose-v3.yaml convert --stdout -j"
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" $KOMPOSE_ROOT/script/test/fixtures/network/output-k8s.json > /tmp/output-k8s.json
convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/network/docker-compose-v3.yaml convert --stdout -j"
# OpenShift test
cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/network/docker-compose-v3.yaml convert --stdout -j"
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" $KOMPOSE_ROOT/script/test/fixtures/network/output-os.json > /tmp/output-os.json
convert::expect_success "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/network/docker-compose-v3.yaml convert --stdout -j"

View File

@ -13,7 +13,7 @@
"io.kompose.service": "appfoo"
},
"annotations": {
"kompose.cmd": "%CMD%"
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
@ -28,7 +28,7 @@
"io.kompose.service": "appfoo"
},
"annotations": {
"kompose.cmd": "%CMD%"
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},

View File

@ -13,7 +13,7 @@
"io.kompose.service": "appfoo"
},
"annotations": {
"kompose.cmd": "%CMD%"
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},