add test for container name without Pod name prefix feature

Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
This commit is contained in:
Oleksandr Krutko
2025-10-17 01:11:41 +03:00
parent 098d8efecc
commit f6dd05d9c4

View File

@@ -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"))
})
})