From 5766f5b587ffc1b78b7a22c7434326bd149c3dd8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 30 Sep 2020 08:58:57 -0400 Subject: Make the e2e test network cleanup more robust. We need to handle removal of non existing network. This allows the `removeCNINetwork` function always to be called. This is needed by tests which are trying to remove the network manually in order to prevent flakes. Fixes #7809 Signed-off-by: Paul Holzinger Signed-off-by: Daniel J Walsh --- test/e2e/network_create_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/e2e/network_create_test.go') diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index a81ca19eb..edd76739f 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -58,7 +58,7 @@ func genericPluginsToPortMap(plugins interface{}, pluginType string) (network.Po func (p *PodmanTestIntegration) removeCNINetwork(name string) { session := p.Podman([]string{"network", "rm", "-f", name}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(BeZero()) + Expect(session.ExitCode()).To(BeNumerically("<=", 1)) } func removeNetworkDevice(name string) { -- cgit v1.2.3-54-g00ecf