summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-23 11:12:50 -0400
committerGitHub <noreply@github.com>2022-08-23 11:12:50 -0400
commit5dea1218a03843f27258528e5f13c6d3dd2b24cd (patch)
tree88ff4661bb079e5c4774f6ba75beeb577721c396 /test
parent8cfbcfe2a8827e726994e3d38ea38337e63ad538 (diff)
parent5f719b533ec6468911a284f2d901d65c098f4539 (diff)
downloadpodman-5dea1218a03843f27258528e5f13c6d3dd2b24cd.tar.gz
podman-5dea1218a03843f27258528e5f13c6d3dd2b24cd.tar.bz2
podman-5dea1218a03843f27258528e5f13c6d3dd2b24cd.zip
Merge pull request #15426 from nicrowe00/14955
podman kube play/down --read from URL
Diffstat (limited to 'test')
-rw-r--r--test/system/700-play.bats25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/system/700-play.bats b/test/system/700-play.bats
index e1955cfd1..bad9544ff 100644
--- a/test/system/700-play.bats
+++ b/test/system/700-play.bats
@@ -361,3 +361,28 @@ status: {}
run_podman pod rm -a
run_podman rm -a
}
+
+@test "podman kube play - URL" {
+ TESTDIR=$PODMAN_TMPDIR/testdir
+ mkdir -p $TESTDIR
+ echo "$testYaml" | sed "s|TESTDIR|${TESTDIR}|g" > $PODMAN_TMPDIR/test.yaml
+
+ HOST_PORT=$(random_free_port)
+ SERVER=http://127.0.0.1:$HOST_PORT
+
+ run_podman run -d --name myyaml -p "$HOST_PORT:80" \
+ -v $PODMAN_TMPDIR/test.yaml:/var/www/testpod.yaml:Z \
+ -w /var/www \
+ $IMAGE /bin/busybox-extras httpd -f -p 80
+
+ run_podman kube play $SERVER/testpod.yaml
+ run_podman inspect test_pod-test --format "{{.State.Running}}"
+ is "$output" "true"
+ run_podman kube down $SERVER/testpod.yaml
+ run_podman 125 inspect test_pod-test
+ is "$output" ".*Error: inspecting object: no such object: \"test_pod-test\""
+
+ run_podman pod rm -a -f
+ run_podman rm -a -f
+ run_podman rm -f -t0 myyaml
+}