summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-27 14:34:58 +0000
committerGitHub <noreply@github.com>2021-10-27 14:34:58 +0000
commitb29dc1bde3a9b56b813a6ab99c7fea6d7859067f (patch)
tree064a77a961360f9e32aa1e47e5a4527857dbc279
parent979b6312286b4bd993d7be0413e1e95c4a0bad56 (diff)
parentd53789068a6cd2269e5f899930ae6c9327eee573 (diff)
downloadpodman-b29dc1bde3a9b56b813a6ab99c7fea6d7859067f.tar.gz
podman-b29dc1bde3a9b56b813a6ab99c7fea6d7859067f.tar.bz2
podman-b29dc1bde3a9b56b813a6ab99c7fea6d7859067f.zip
Merge pull request #12110 from cevich/fix_systemd_pid1
Fix systemd PID1 test
-rw-r--r--test/e2e/systemd_test.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go
index a1b25b723..98def3d8f 100644
--- a/test/e2e/systemd_test.go
+++ b/test/e2e/systemd_test.go
@@ -4,7 +4,6 @@ import (
"io/ioutil"
"os"
"strings"
- "time"
. "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
@@ -82,27 +81,13 @@ WantedBy=multi-user.target
run := podmanTest.Podman([]string{"run", "--name", ctrName, "-t", "-i", "-d", ubi_init, "/sbin/init"})
run.WaitWithDefaultTimeout()
Expect(run).Should(Exit(0))
- ctrID := run.OutputToString()
logs := podmanTest.Podman([]string{"logs", ctrName})
logs.WaitWithDefaultTimeout()
Expect(logs).Should(Exit(0))
// Give container 10 seconds to start
- started := false
- for i := 0; i < 10; i++ {
- runningCtrs := podmanTest.Podman([]string{"ps", "-q", "--no-trunc"})
- runningCtrs.WaitWithDefaultTimeout()
- Expect(runningCtrs).Should(Exit(0))
-
- if strings.Contains(runningCtrs.OutputToString(), ctrID) {
- started = true
- break
- }
-
- time.Sleep(1 * time.Second)
- }
-
+ started := podmanTest.WaitContainerReady(ctrName, "Reached target Multi-User System.", 30, 1)
Expect(started).To(BeTrue())
systemctl := podmanTest.Podman([]string{"exec", "-t", "-i", ctrName, "systemctl", "status", "--no-pager"})