summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-11-19 18:23:26 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-11-19 18:23:26 +0100
commit8198e96f3192c9a96b0568524d5732e34025e09f (patch)
treecc5d37ff25b8a6bfa7f46bec8e0e27cfec28428f
parent501643c8bde591fcb8e4c42564f1b854128ad2f7 (diff)
downloadpodman-8198e96f3192c9a96b0568524d5732e34025e09f.tar.gz
podman-8198e96f3192c9a96b0568524d5732e34025e09f.tar.bz2
podman-8198e96f3192c9a96b0568524d5732e34025e09f.zip
Force iptables driver for netavark tests
Firewalld cannot be used because it can connect to the dbus api but talks to firewalld in the host namespace. This will affact your host badly and also causes tests to fail. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
-rw-r--r--libpod/network/netavark/run_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/network/netavark/run_test.go b/libpod/network/netavark/run_test.go
index 67dc51c10..f79e6d812 100644
--- a/libpod/network/netavark/run_test.go
+++ b/libpod/network/netavark/run_test.go
@@ -89,6 +89,10 @@ var _ = Describe("run netavark", func() {
if err != nil {
Fail("Failed to create netns")
}
+
+ // Force iptables driver, firewalld is broken inside the extra
+ // namespace because it still connects to firewalld on the host.
+ _ = os.Setenv("NETAVARK_FW", "iptables")
})
JustBeforeEach(func() {
@@ -109,6 +113,8 @@ var _ = Describe("run netavark", func() {
netns.UnmountNS(netNSContainer)
netNSContainer.Close()
+
+ _ = os.Unsetenv("NETAVARK_FW")
})
It("test basic setup", func() {