testutil: Fix sense of hasFwBackendArg check

Introduced by commit 39ab393 ("Add daemon option --firewall-backend").

Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
Rob Murray
2025-07-21 17:40:38 +01:00
parent 596e088bd0
commit 26e487db78

View File

@@ -530,10 +530,10 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
d.args = append(d.args, "--storage-driver", d.storageDriver)
}
hasFwBackendArg := !slices.ContainsFunc(providedArgs, func(s string) bool {
hasFwBackendArg := slices.ContainsFunc(providedArgs, func(s string) bool {
return strings.HasPrefix(s, "--firewall-backend")
})
if hasFwBackendArg {
if !hasFwBackendArg {
if fw := os.Getenv("DOCKER_FIREWALL_BACKEND"); fw != "" {
d.args = append(d.args, "--firewall-backend="+fw)
}