summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/20-containers.at2
-rw-r--r--test/e2e/play_kube_test.go29
-rw-r--r--test/system/005-info.bats1
-rw-r--r--test/system/030-run.bats14
4 files changed, 32 insertions, 14 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 45c040fbc..cc5eda88e 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -434,7 +434,7 @@ cid=$(jq -r '.Id' <<<"$output")
t POST "commit?container=nonesuch" 404
cparam="repo=newrepo&tag=v3&comment=abcd&author=eric"
-cparam="$cparam&format=docker&changes=CMD=/bin/bar,EXPOSE=9090"
+cparam="$cparam&format=docker&changes=CMD%20/bin/bar%0aEXPOSE%209090"
t POST "commit?container=${cid:0:12}&$cparam" 201 \
.Id~[0-9a-f]\\{64\\}
iid=$(jq -r '.Id' <<<"$output")
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go
index 63c9bf7f3..cbaa8d6a4 100644
--- a/test/e2e/play_kube_test.go
+++ b/test/e2e/play_kube_test.go
@@ -78,6 +78,25 @@ spec:
- 24h
status: {}
`
+
+var podWithoutConfigMapDefined = `
+apiVersion: v1
+kind: Pod
+metadata:
+ name: testpod1
+spec:
+ containers:
+ - name: alpine
+ image: quay.io/libpod/alpine:latest
+ volumeMounts:
+ - name: mycm
+ mountPath: /mycm
+ volumes:
+ - name: mycm
+ configMap:
+ name: mycm
+`
+
var sharedNamespacePodYaml = `
apiVersion: v1
kind: Pod
@@ -1235,6 +1254,16 @@ var _ = Describe("Podman play kube", func() {
}
})
+ It("podman play kube with non-existing configmap", func() {
+ err := writeYaml(podWithoutConfigMapDefined, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube).Should(Exit(125))
+ Expect(kube.ErrorToString()).To(ContainSubstring("failed to create volume \"mycm\": no such ConfigMap \"mycm\""))
+ })
+
It("podman play kube test HostAliases with --no-hosts", func() {
pod := getPod(withHostAliases("192.168.1.2", []string{
"test1.podman.io",
diff --git a/test/system/005-info.bats b/test/system/005-info.bats
index 045045fa6..5f3cdff7e 100644
--- a/test/system/005-info.bats
+++ b/test/system/005-info.bats
@@ -43,7 +43,6 @@ host.conmon.package | .*conmon.*
host.cgroupManager | \\\(systemd\\\|cgroupfs\\\)
host.cgroupVersion | v[12]
host.ociRuntime.path | $expr_path
-host.ociRuntime.package | .*\\\(crun\\\|runc\\\).*
store.configFile | $expr_path
store.graphDriverName | [a-z0-9]\\\+\\\$
store.graphRoot | $expr_path
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 2d5ecab39..ec85ef166 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -5,18 +5,8 @@ load helpers
@test "podman run - basic tests" {
rand=$(random_string 30)
- # 2019-09 Fedora 31 and rawhide (32) are switching from runc to crun
- # because of cgroups v2; crun emits different error messages.
- # Default to runc:
- err_no_such_cmd="Error: .*: starting container process caused.*exec:.*stat /no/such/command: no such file or directory"
- err_no_exec_dir="Error: .*: starting container process caused.*exec:.* permission denied"
-
- # ...but check the configured runtime engine, and switch to crun as needed
- run_podman info --format '{{ .Host.OCIRuntime.Path }}'
- if expr "$output" : ".*/crun"; then
- err_no_such_cmd="Error: crun: executable file.* not found in \$PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found"
- err_no_exec_dir="Error: crun: open executable: Operation not permitted: OCI permission denied"
- fi
+ err_no_such_cmd="Error:.*/no/such/command.*[Nn]o such file or directory"
+ err_no_exec_dir="Error:.*exec.*permission denied"
tests="
true | 0 |