test for entrypoint and command

This commit is contained in:
Tomas Kral 2016-09-05 10:40:50 +02:00
parent cc4f162cea
commit e127ce17bd
No known key found for this signature in database
GPG Key ID: E690DA7E4F291FA6
4 changed files with 114 additions and 0 deletions

View File

@ -34,5 +34,14 @@ convert::expect_success_and_warning "kompose convert --stdout -f $KOMPOSE_ROOT/s
# openshift test
convert::expect_success_and_warning "kompose convert --stdout --dc -f $KOMPOSE_ROOT/script/test/fixtures/ngnix-node-redis/docker-compose.yml" "$KOMPOSE_ROOT/script/test/fixtures/ngnix-node-redis/output-os.json" "Unsupported key build - ignoring"
######
# Tests related to docker-compose file in /script/test/fixtures/entrypoint-command
# kubernetes test
convert::expect_success_and_warning "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/entrypoint-command/docker-compose.yml" "$KOMPOSE_ROOT/script/test/fixtures/entrypoint-command/output-k8s.json" "Service cannot be created because of missing port."
# openshift test
convert::expect_success_and_warning "kompose convert --stdout --dc -f $KOMPOSE_ROOT/script/test/fixtures/entrypoint-command/docker-compose.yml" "$KOMPOSE_ROOT/script/test/fixtures/entrypoint-command/output-os.json" "Service cannot be created because of missing port."
exit $EXIT_STATUS

View File

@ -0,0 +1,7 @@
version: '2'
services:
base:
image: busybox
entrypoint: echo
command: foo

View File

@ -0,0 +1,44 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "base",
"creationTimestamp": null
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "base"
}
},
"spec": {
"containers": [
{
"name": "base",
"image": "busybox",
"command": [
"echo"
],
"args": [
"foo"
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
]
}

View File

@ -0,0 +1,54 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "base",
"creationTimestamp": null,
"labels": {
"service": "base"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "base"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "base"
}
},
"spec": {
"containers": [
{
"name": "base",
"image": "busybox",
"command": [
"echo"
],
"args": [
"foo"
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
}
]
}