diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index ed253a5aea..b1996961d0 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -6420,4 +6420,13 @@ spec: Expect(testfile).ToNot(BeAnExistingFile(), "file should never be created on the host") }) + + It("test container name without Pod name prefix", func() { + err := writeYaml(podnameEqualsContainerNameYaml, kubeYaml) + Expect(err).ToNot(HaveOccurred()) + + podmanTest.PodmanExitCleanly("kube", "play", "--no-pod-prefix", kubeYaml) + inspect := podmanTest.PodmanExitCleanly("inspect", "podnameEqualsContainerNameYaml") + Expect(inspect.InspectContainerToJSON()[0].Name).Should(Equal("podnameEqualsContainerNameYaml")) + }) })