Fix v3 hostpath path concatenate error (#1222)

This commit is contained in:
Hang Yan authored and GitHub committed 2019-12-28 18:40:36 +08:00
1 parent ae138029a1
commit 25337eb82c
4 files changed
+30 -3

No files matched your search

+14
View File
@@ -218,6 +218,20 @@ hostpath=$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/data_sux
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" -e "s;%HOSTPATH%;$hostpath;g" $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/output-os-template.json > /tmp/output-os.json
convert::expect_success "$cmd" "/tmp/output-os.json"
cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/docker-compose-v3.yml convert --stdout -j --volumes hostPath"
hostpath=$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/data_sux
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" -e "s;%HOSTPATH%;$hostpath;g" $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/output-k8s-template.json > /tmp/output-k8s.json
convert::expect_success "$cmd" "/tmp/output-k8s.json"
# openshift test
cmd="kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/docker-compose-v3.yml convert --stdout -j --volumes hostPath"
hostpath=$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/data_sux
sed -e "s;%VERSION%;$version;g" -e "s;%CMD%;$cmd;g" -e "s;%HOSTPATH%;$hostpath;g" $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/hostpath/output-os-template.json > /tmp/output-os.json
convert::expect_success "$cmd" "/tmp/output-os.json"
######
# Tests related to docker-compose file in /script/test/fixtures/volume-mounts/volumes-from
# kubernetes test
@@ -0,0 +1,8 @@
version: '3'
services:
db:
image: postgres:10.1
ports:
- "5432"
volumes:
- ./data_sux:/var/lib/postgresql/data_sux