From f6dd05d9c49014d37e44f434edcaf6a0c726cc41 Mon Sep 17 00:00:00 2001 From: Oleksandr Krutko Date: Fri, 17 Oct 2025 01:11:41 +0300 Subject: [PATCH] add test for container name without Pod name prefix feature Signed-off-by: Oleksandr Krutko --- test/e2e/play_kube_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) 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")) + }) })