mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Merge pull request #49946 from robmry/modprobe_rootless_test_integration
Try to load br_netfilter on the test host for rootless test-integration
This commit is contained in:
@@ -84,6 +84,9 @@ if [ -n "$DOCKER_ROOTLESS" ]; then
|
||||
mkdir -p -m 700 "/tmp/docker-${uid}"
|
||||
chown "$user" "/tmp/docker-${uid}"
|
||||
chmod -R o+w "$DEST"
|
||||
# The rootless daemon won't be able to load modules for tests that need them, so do it here.
|
||||
# There's no modprobe in the dev container, so https://x.com/lucabruno/status/902934379835662336
|
||||
ip link show br_netfilter || true
|
||||
dockerd="sudo -u $user -E -E XDG_RUNTIME_DIR=/tmp/docker-${uid} -E HOME=/home/${user} -E PATH=$PATH -- dockerd-rootless.sh"
|
||||
fi
|
||||
|
||||
|
||||
@@ -527,7 +527,6 @@ 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)
|
||||
@@ -623,7 +622,6 @@ 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
|
||||
@@ -700,7 +698,6 @@ 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