summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-15 15:07:25 +0100
committerMatthew Heon <mheon@redhat.com>2021-02-18 10:57:25 -0500
commitcf42bdcb41f34b5cdfc15e865089ec1e88681e25 (patch)
tree4db0c155995269a590e5a3913270a188ff59d364
parent33ac798406ae8e3939d0550f93cf341f33bf56cd (diff)
downloadpodman-cf42bdcb41f34b5cdfc15e865089ec1e88681e25.tar.gz
podman-cf42bdcb41f34b5cdfc15e865089ec1e88681e25.tar.bz2
podman-cf42bdcb41f34b5cdfc15e865089ec1e88681e25.zip
e2e: fix network alias test
The logic in the e2e test for multiple network aliases is indicating the test should wait for the containerized nginx to be ready. As this may take some time, the test does an exponential backoff starting at 2050ms. Fix the logic by removing the `Expect(...)` call during the exponential backoff. Otherwise, the test errors immediately. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r--test/e2e/network_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index df8ff0684..d191cb6bb 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -407,6 +407,7 @@ var _ = Describe("Podman network", func() {
Expect(lines[0]).To(Equal(netName1))
Expect(lines[1]).To(Equal(netName2))
})
+
It("podman network with multiple aliases", func() {
var worked bool
netName := "aliasTest" + stringid.GenerateNonCryptoID()
@@ -424,7 +425,7 @@ var _ = Describe("Podman network", func() {
// Test curl against the container's name
c1 := podmanTest.Podman([]string{"run", "--network=" + netName, nginx, "curl", "web"})
c1.WaitWithDefaultTimeout()
- worked = Expect(c1.ExitCode()).To(BeZero())
+ worked = c1.ExitCode() == 0
if worked {
break
}