mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
rootless: skip tests that need br-netfilter loaded
Skip tests that have recently started failing in rootless
mode with error:
failed to start daemon: Error initializing network controller:
error creating default "bridge" network:
cannot restrict inter-container communication or run
without the userland proxy:
stat /proc/sys/net/bridge/bridge-nf-call-iptables:
no such file or directory:
set environment variable DOCKER_IGNORE_BR_NETFILTER_ERROR=1 to ignore
(Perhaps we can ensure the module is loaded before starting
the rootless env - or work out why the failures have only
recently started, and put-back whatever changed. But, for
now, I think we need to skip.)
Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
@@ -522,6 +522,7 @@ func TestPublishedPortAlreadyInUse(t *testing.T) {
|
||||
//
|
||||
// Regression test for https://github.com/moby/moby/issues/49654.
|
||||
func TestAllPortMappingsAreReturned(t *testing.T) {
|
||||
skip.If(t, testEnv.IsRootless, "cannot disable userland proxy in rootless netns unless br-netfilter loaded by host")
|
||||
ctx := setupTest(t)
|
||||
|
||||
d := daemon.New(t)
|
||||
@@ -617,6 +618,7 @@ func TestFirewalldReloadNoZombies(t *testing.T) {
|
||||
// TestLegacyLink checks that a legacy link ("--link" in the default bridge network)
|
||||
// sets up a hostname and opens ports when the daemon is running with icc=false.
|
||||
func TestLegacyLink(t *testing.T) {
|
||||
skip.If(t, testEnv.IsRootless, "cannot set icc=false in rootless netns unless br-netfilter loaded by host")
|
||||
ctx := setupTest(t)
|
||||
|
||||
// Tidy up after the test by starting a new daemon, which will remove the icc=false
|
||||
@@ -693,6 +695,7 @@ func TestLegacyLink(t *testing.T) {
|
||||
//
|
||||
// Replacement for DockerDaemonSuite/TestDaemonLinksIpTablesRulesWhenLinkAndUnlink
|
||||
func TestRemoveLegacyLink(t *testing.T) {
|
||||
skip.If(t, testEnv.IsRootless, "cannot set icc=false in rootless netns unless br-netfilter loaded by host")
|
||||
ctx := setupTest(t)
|
||||
|
||||
// Tidy up after the test by starting a new daemon, which will remove the icc=false
|
||||
|
||||
Reference in New Issue
Block a user