aboutsummaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-09-29 16:59:35 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-09-29 18:07:41 +0200
commitfe2b4df382a66889931a0158fc77d3235e00d8b8 (patch)
tree0b6293977bdf563ba67dcb17198d4003ea8e66d6 /test/system
parent4c39b391036c8383825b76ad0e2edf1efb53b4da (diff)
downloadpodman-fe2b4df382a66889931a0158fc77d3235e00d8b8.tar.gz
podman-fe2b4df382a66889931a0158fc77d3235e00d8b8.tar.bz2
podman-fe2b4df382a66889931a0158fc77d3235e00d8b8.zip
podman kube play allow --network host
I see no reason to block --network host with kube play and force users to have to set it in the yaml file. This is just confusing when compared to the other podman create/run --network options, see discussion in #15945. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/700-play.bats10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/system/700-play.bats b/test/system/700-play.bats
index 578d28394..5f3eb1ef2 100644
--- a/test/system/700-play.bats
+++ b/test/system/700-play.bats
@@ -165,8 +165,14 @@ EOF
TESTDIR=$PODMAN_TMPDIR/testdir
mkdir -p $TESTDIR
echo "$testYaml" | sed "s|TESTDIR|${TESTDIR}|g" > $PODMAN_TMPDIR/test.yaml
- run_podman 125 kube play --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 with --network host"
+ run_podman kube play --network host $PODMAN_TMPDIR/test.yaml
+ is "$output" "Pod:.*" "podman kube play should work with --network host"
+
+ run_podman pod inspect --format "{{.InfraConfig.HostNetwork}}" test_pod
+ is "$output" "true" ".InfraConfig.HostNetwork"
+ run_podman stop -a -t 0
+ run_podman pod rm -t 0 -f test_pod
+
run_podman kube play --network slirp4netns:port_handler=slirp4netns $PODMAN_TMPDIR/test.yaml
run_podman pod inspect --format {{.InfraContainerID}} "${lines[1]}"
infraID="$output"