summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-06-29 14:18:46 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-06-30 13:32:27 -0400
commit092902b455551d7353163c1e6d322f3605b9a897 (patch)
tree40b067377bda67d7d4002100e7210547bf4317f5 /test
parent61b7beaf8e595bdc1305a12b49e26a25bbc2bc42 (diff)
downloadpodman-092902b455551d7353163c1e6d322f3605b9a897.tar.gz
podman-092902b455551d7353163c1e6d322f3605b9a897.tar.bz2
podman-092902b455551d7353163c1e6d322f3605b9a897.zip
Handle advanced --network options in podman play kube
Since Podman create/run can support this, so should play. Fixes: https://github.com/containers/podman/issues/10807 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/700-play.bats12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/system/700-play.bats b/test/system/700-play.bats
index 15f3e240a..3e6961b08 100644
--- a/test/system/700-play.bats
+++ b/test/system/700-play.bats
@@ -89,6 +89,18 @@ RELABEL="system_u:object_r:container_file_t:s0"
run_podman pod rm -f test_pod
}
+@test "podman play --network" {
+ TESTDIR=$PODMAN_TMPDIR/testdir
+ mkdir -p $TESTDIR
+ echo "$testYaml" | sed "s|TESTDIR|${TESTDIR}|g" > $PODMAN_TMPDIR/test.yaml
+ run_podman 125 play kube --network bridge $PODMAN_TMPDIR/test.yaml
+ is "$output" ".*invalid value passed to --network: bridge or host networking must be configured in YAML" "podman plan-network should fail wth --network host"
+ run_podman 125 play kube --network host $PODMAN_TMPDIR/test.yaml
+ is "$output" ".*invalid value passed to --network: bridge or host networking must be configured in YAML" "podman plan-network should fail wth --network host"
+ run_podman play kube --network slirp4netns:port_handler=slirp4netns $PODMAN_TMPDIR/test.yaml
+ run_podman pod rm -f test_pod
+}
+
@test "podman play with user from image" {
TESTDIR=$PODMAN_TMPDIR/testdir
mkdir -p $TESTDIR