hack/make/test-integration: disable firewalld integration

The daemon started by the test-integration script needs to run without
firewalld integration to make sure that daemons started by networking
tests will handle firewalld reload without any interference (i.e.
without another daemon racing against them to recreate the iptables
chains).

Most tests are already running their own daemons, but the few that don't
and need firewalld integration are updated to start their own.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton
2025-08-26 23:25:22 +02:00
parent 18651d8819
commit 60c6e57b82
4 changed files with 39 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/moby/moby/client"
"github.com/moby/moby/v2/integration/internal/testutils/networking"
"github.com/moby/moby/v2/testutil/daemon"
"github.com/moby/moby/v2/testutil/request"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
@@ -15,7 +16,13 @@ const defaultFirewallBackend = "iptables"
func TestInfoFirewallBackend(t *testing.T) {
ctx := setupTest(t)
c := testEnv.APIClient()
d := daemon.New(t)
d.StartWithBusybox(ctx, t)
t.Cleanup(func() { d.Stop(t) })
c := d.NewClientT(t)
t.Cleanup(func() { c.Close() })
expDriver := defaultFirewallBackend
if val := os.Getenv("DOCKER_FIREWALL_BACKEND"); val != "" {