Adds mem_limit support for conversion

This commit adds mem_limit support. Taking the value from
docker-compose.yaml and converting it to it's associative value in
Kubernetes artifacts.

Closes (half) of
https://github.com/kubernetes-incubator/kompose/issues/267
This commit is contained in:
Charlie Drage
2017-02-22 08:19:27 -05:00
parent 786f5c4f99
commit 858314e06b
9 changed files with 289 additions and 27 deletions
+10
View File
@@ -55,6 +55,16 @@ convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/entrypoin
convert::expect_success "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/entrypoint-command/docker-compose.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/entrypoint-command/output-os.json"
######
# Tests related to docker-compose file in /script/test/fixtures/mem-limit
# kubernetes test
# Test the "memory limit" conversion
convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/mem-limit/docker-compose.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/mem-limit/output-k8s.json"
# Test the "memory limit" conversion with "Mb" tagged on
convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/mem-limit/docker-compose-mb.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/mem-limit/output-mb-k8s.json"
######
# Tests related to docker-compose file in /script/test/fixtures/ports-with-proto
# kubernetes test