diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-09 04:48:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 04:48:49 -0400 |
commit | ccb6211c7beff29ba0d0d374665e1b24262c276f (patch) | |
tree | 740b480f8610df79055a2b18ca077aaa1bbfa7ac /test | |
parent | a0ecb8675d1c45f083a70a6b3faaebd22abe5417 (diff) | |
parent | b58e7e7f11f99b22d68cbbf28c8d52ff10be482e (diff) | |
download | podman-ccb6211c7beff29ba0d0d374665e1b24262c276f.tar.gz podman-ccb6211c7beff29ba0d0d374665e1b24262c276f.tar.bz2 podman-ccb6211c7beff29ba0d0d374665e1b24262c276f.zip |
Merge pull request #14121 from cdoern/kube
play kube log tag handling
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/play_kube_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index 45414ec04..1b223637e 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -3536,4 +3536,24 @@ ENV OPENJ9_JAVA_OPTIONS=%q Expect(kube.ErrorToString()).To(ContainSubstring("ambiguous configuration: the same config map foo is present in YAML and in --configmaps")) }) }) + + It("podman play kube --log-opt = tag test", func() { + pod := getPod() + err := generateKubeYaml("pod", pod, kubeYaml) + Expect(err).To(BeNil()) + + kube := podmanTest.Podman([]string{"play", "kube", kubeYaml, "--log-driver", "journald", "--log-opt", "tag={{.ImageName}}"}) + kube.WaitWithDefaultTimeout() + Expect(kube).Should(Exit(0)) + + start := podmanTest.Podman([]string{"start", getCtrNameInPod(pod)}) + start.WaitWithDefaultTimeout() + Expect(start).Should(Exit(0)) + + inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod)}) + inspect.WaitWithDefaultTimeout() + Expect(start).Should(Exit(0)) + Expect((inspect.InspectContainerToJSON()[0]).HostConfig.LogConfig.Tag).To(Equal("{{.ImageName}}")) + + }) }) |