diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-06 09:16:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 09:16:04 -0400 |
commit | d6000a0b86fc835bca5cd28722ad75228a809629 (patch) | |
tree | f8e9d72f59df2de34ffe7d6a4d84002ce33b1d55 /test/compose/ipam_set_ip | |
parent | b6405c1ae6fb1ac6b08493fa8e2f77a0fe9ff39e (diff) | |
parent | c0de4a4d70a68e5afeb70a5f6c5c5fbd2ca0bcc2 (diff) | |
download | podman-d6000a0b86fc835bca5cd28722ad75228a809629.tar.gz podman-d6000a0b86fc835bca5cd28722ad75228a809629.tar.bz2 podman-d6000a0b86fc835bca5cd28722ad75228a809629.zip |
Merge pull request #10246 from zhangguanzhang/compose-static-ip
Fixes docker-compose cannot set static ip when use ipam
Diffstat (limited to 'test/compose/ipam_set_ip')
-rw-r--r-- | test/compose/ipam_set_ip/docker-compose.yml | 17 | ||||
-rw-r--r-- | test/compose/ipam_set_ip/tests.sh | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/compose/ipam_set_ip/docker-compose.yml b/test/compose/ipam_set_ip/docker-compose.yml new file mode 100644 index 000000000..d220c02c0 --- /dev/null +++ b/test/compose/ipam_set_ip/docker-compose.yml @@ -0,0 +1,17 @@ +version: "3.2" +services: + test: + image: alpine + networks: + net1: + ipv4_address: 10.123.0.253 + tty: true + command: ["top"] + +networks: + net1: + driver: bridge + ipam: + driver: default + config: + - subnet: 10.123.0.0/24 diff --git a/test/compose/ipam_set_ip/tests.sh b/test/compose/ipam_set_ip/tests.sh new file mode 100644 index 000000000..ecaf3167e --- /dev/null +++ b/test/compose/ipam_set_ip/tests.sh @@ -0,0 +1,4 @@ +# -*- bash -*- + +podman container inspect ipam_set_ip_test_1 --format '{{ .NetworkSettings.Networks.ipam_set_ip_net1.IPAddress }}' +like "$output" "10.123.0.253" "$testname : ip address is set" |