diff options
author | Qi Wang <qiwan@redhat.com> | 2019-04-11 15:59:30 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2019-05-02 12:14:51 -0400 |
commit | a477a8ff755e2807d0745b207d6a5bf57de58e4c (patch) | |
tree | a7a6f479c733c42ddc7aca2a30b1c753cf9238bb /test/e2e | |
parent | 7d05ff3fc772a7be4860ed4a3cd59a62f8bb893a (diff) | |
download | podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.tar.gz podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.tar.bz2 podman-a477a8ff755e2807d0745b207d6a5bf57de58e4c.zip |
Add variable for global flags to runlabel
use $GLOBAL_OPTS to pass global flags to the runlabel command.
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/runlabel_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go index b1d057bfd..f52a2b8fc 100644 --- a/test/e2e/runlabel_test.go +++ b/test/e2e/runlabel_test.go @@ -18,6 +18,11 @@ var LsDockerfile = ` FROM alpine:latest LABEL RUN ls -la` +var GlobalDockerfile = ` +FROM alpine:latest +LABEL RUN echo \$GLOBAL_OPTS +` + var _ = Describe("podman container runlabel", func() { var ( tempdir string @@ -78,4 +83,18 @@ var _ = Describe("podman container runlabel", func() { Expect(result.ExitCode()).ToNot(Equal(0)) }) + + It("podman container runlabel global options", func() { + image := "podman-global-test:ls" + podmanTest.BuildImage(GlobalDockerfile, image, "false") + result := podmanTest.Podman([]string{"--syslog", "--log-level", "debug", "container", "runlabel", "RUN", image}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + + Expect(result.OutputToString()).To(ContainSubstring("--syslog true")) + Expect(result.OutputToString()).To(ContainSubstring("--log-level debug")) + result = podmanTest.Podman([]string{"rmi", image}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + }) }) |