diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-06 16:16:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 16:16:49 -0400 |
commit | d83f49ef6b8a53535257bb56f5573ef3f65e3ba9 (patch) | |
tree | 913102be0b4701edc9907e326e249deaf2a75a2f /test | |
parent | b7dd714532e0445438e9c5fc5be7f8e0271c21d0 (diff) | |
parent | 6acd265306370ab5cfeaf2843bd359fe13216d92 (diff) | |
download | podman-d83f49ef6b8a53535257bb56f5573ef3f65e3ba9.tar.gz podman-d83f49ef6b8a53535257bb56f5573ef3f65e3ba9.tar.bz2 podman-d83f49ef6b8a53535257bb56f5573ef3f65e3ba9.zip |
Merge pull request #9754 from mheon/add_dep
Add --requires flag to podman run/create
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 23930b4f7..cefe00655 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1588,4 +1588,29 @@ WORKDIR /madethis`, BB) Expect(session.OutputToString()).To(ContainSubstring("mysecret")) }) + + It("podman run --requires", func() { + depName := "ctr1" + depContainer := podmanTest.Podman([]string{"create", "--name", depName, ALPINE, "top"}) + depContainer.WaitWithDefaultTimeout() + Expect(depContainer.ExitCode()).To(Equal(0)) + + mainName := "ctr2" + mainContainer := podmanTest.Podman([]string{"run", "--name", mainName, "--requires", depName, "-d", ALPINE, "top"}) + mainContainer.WaitWithDefaultTimeout() + Expect(mainContainer.ExitCode()).To(Equal(0)) + + stop := podmanTest.Podman([]string{"stop", "--all"}) + stop.WaitWithDefaultTimeout() + Expect(stop.ExitCode()).To(Equal(0)) + + start := podmanTest.Podman([]string{"start", mainName}) + start.WaitWithDefaultTimeout() + Expect(start.ExitCode()).To(Equal(0)) + + running := podmanTest.Podman([]string{"ps", "-q"}) + running.WaitWithDefaultTimeout() + Expect(running.ExitCode()).To(Equal(0)) + Expect(len(running.OutputToStringArray())).To(Equal(2)) + }) }) |