summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-22 09:08:33 -0500
committerGitHub <noreply@github.com>2021-02-22 09:08:33 -0500
commit6fbf73ed8bd34738f3f901df1e5d3b592a9c3354 (patch)
tree84e9ad888d9f633ec02c8b1840d380dd25e536e9 /test
parent5da7c69968cb14120dba71de0c900902013c4517 (diff)
parentf06dd45e0c1b4a36bb93f33cc863d54af94b5155 (diff)
downloadpodman-6fbf73ed8bd34738f3f901df1e5d3b592a9c3354.tar.gz
podman-6fbf73ed8bd34738f3f901df1e5d3b592a9c3354.tar.bz2
podman-6fbf73ed8bd34738f3f901df1e5d3b592a9c3354.zip
Merge pull request #9420 from rhatdan/kube
[NO TESTS NEEDED] Allow podman play kube to read yaml file from stdin
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
+}