aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-05 13:46:23 +0000
committerGitHub <noreply@github.com>2022-07-05 13:46:23 +0000
commit2c9f0753da6486b7ed2ef3b37b65ae0b9ca6d3fe (patch)
treeaff6ad7a94594f22c5a33c176dd791bbb9dabf0d /test
parent6315936f9a73733d2dbebdd42a2f6e590fdeee6e (diff)
parent488eb3b74cd169e94de8364294586bce0925b710 (diff)
downloadpodman-2c9f0753da6486b7ed2ef3b37b65ae0b9ca6d3fe.tar.gz
podman-2c9f0753da6486b7ed2ef3b37b65ae0b9ca6d3fe.tar.bz2
podman-2c9f0753da6486b7ed2ef3b37b65ae0b9ca6d3fe.zip
Merge pull request #14534 from jakecorrenti/docker-compose-update-network-mtu
(rootful) docker-compose now updates network MTU
Diffstat (limited to 'test')
-rw-r--r--test/compose/update_network_mtu/docker-compose.yml26
-rw-r--r--test/compose/update_network_mtu/tests.sh10
2 files changed, 36 insertions, 0 deletions
diff --git a/test/compose/update_network_mtu/docker-compose.yml b/test/compose/update_network_mtu/docker-compose.yml
new file mode 100644
index 000000000..fabd7b4f2
--- /dev/null
+++ b/test/compose/update_network_mtu/docker-compose.yml
@@ -0,0 +1,26 @@
+version: '3.7'
+
+services:
+ nginx:
+ image: alpine
+ ports:
+ - 8000:5000
+ networks:
+ - default
+ - macvlan_net
+
+networks:
+ default:
+ driver: bridge
+ driver_opts:
+ com.docker.network.bridge.name: docker0
+ com.docker.network.driver.mtu: 9000
+ macvlan_net:
+ driver: macvlan
+ driver_opts:
+ mode: bridge
+ ipam:
+ config:
+ -
+ subnet: 192.168.20.0/24
+ gateway: 192.168.20.1
diff --git a/test/compose/update_network_mtu/tests.sh b/test/compose/update_network_mtu/tests.sh
new file mode 100644
index 000000000..57411eb34
--- /dev/null
+++ b/test/compose/update_network_mtu/tests.sh
@@ -0,0 +1,10 @@
+# -*- bash -*-
+
+podman network inspect --format='{{ range . }} {{ .Options.mtu }} {{ end }}' update_network_mtu_default
+like "$output" "9000" "$testname : network mtu is set"
+
+podman network inspect --format='{{ range . }} {{ .NetworkInterface }} {{ end }}' update_network_mtu_default
+like "$output" "docker0" "$testname: network interface is set"
+
+podman network inspect --format='{{ range . }} {{ .Options.mode }} {{ end }}' update_network_mtu_macvlan_net
+like "$output" "bridge" "$testname : network mode is set"