diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-02-18 06:11:29 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-02-19 12:53:25 -0500 |
commit | f06dd45e0c1b4a36bb93f33cc863d54af94b5155 (patch) | |
tree | 1b41b817cb0a7941c9b5a1bcbb1369aceb40f078 /test | |
parent | b6db60e58f2f5abb4902c28c91e770495f3d4926 (diff) | |
download | podman-f06dd45e0c1b4a36bb93f33cc863d54af94b5155.tar.gz podman-f06dd45e0c1b4a36bb93f33cc863d54af94b5155.tar.bz2 podman-f06dd45e0c1b4a36bb93f33cc863d54af94b5155.zip |
Allow podman play kube to read yaml file from stdin
Fixes: https://github.com/containers/podman/issues/8996
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/system/700-play.bats (renamed from test/e2e/test.yaml) | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/test/e2e/test.yaml b/test/system/700-play.bats index 98d2c91df..e7904f59f 100644 --- a/test/e2e/test.yaml +++ b/test/system/700-play.bats @@ -1,13 +1,17 @@ -# Save the output of this file and use kubectl create -f to import -# it into Kubernetes. +#!/usr/bin/env bats -*- bats -*- # -# Created with podman-1.6.2 +# Test podman play +# + +load helpers + +testYaml=" apiVersion: v1 kind: Pod metadata: labels: app: test - name: test + name: test_pod spec: containers: - command: @@ -20,7 +24,7 @@ spec: value: xterm - name: container value: podman - image: docker.io/library/fedora:latest + image: quay.io/libpod/alpine:latest name: test resources: {} securityContext: @@ -31,7 +35,20 @@ spec: capabilities: {} privileged: false seLinuxOptions: - level: "s0:c1,c2" + level: "s0:c1,c2" readOnlyRootFilesystem: false workingDir: / status: {} +" + +@test "podman play with stdin" { + echo "$testYaml" > $PODMAN_TMPDIR/test.yaml + run_podman play kube - < $PODMAN_TMPDIR/test.yaml + run_podman pod rm -f test_pod +} + +@test "podman play" { + echo "$testYaml" > $PODMAN_TMPDIR/test.yaml + run_podman play kube $PODMAN_TMPDIR/test.yaml + run_podman pod rm -f test_pod +} |