Merge pull request #39431 from thaJeztah/macvlan_redundant_checks
Integration: remove redundant kernel version check for MACVlan
This commit is contained in:
commit
6359da4afa
|
@ -1,6 +1,6 @@
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package macvlan
|
package macvlan // import "github.com/docker/docker/integration/network/macvlan"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -20,7 +20,6 @@ import (
|
||||||
func TestDockerNetworkMacvlanPersistance(t *testing.T) {
|
func TestDockerNetworkMacvlanPersistance(t *testing.T) {
|
||||||
// verify the driver automatically provisions the 802.1q link (dm-dummy0.60)
|
// verify the driver automatically provisions the 802.1q link (dm-dummy0.60)
|
||||||
skip.If(t, testEnv.IsRemoteDaemon)
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, !macvlanKernelSupport(), "Kernel doesn't support macvlan")
|
|
||||||
|
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
d.StartWithBusybox(t)
|
d.StartWithBusybox(t)
|
||||||
|
@ -43,7 +42,6 @@ func TestDockerNetworkMacvlanPersistance(t *testing.T) {
|
||||||
|
|
||||||
func TestDockerNetworkMacvlan(t *testing.T) {
|
func TestDockerNetworkMacvlan(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon)
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, !macvlanKernelSupport(), "Kernel doesn't support macvlan")
|
|
||||||
|
|
||||||
for _, tc := range []struct {
|
for _, tc := range []struct {
|
||||||
name string
|
name string
|
||||||
|
@ -271,8 +269,3 @@ func testMacvlanAddressing(client client.APIClient) func(*testing.T) {
|
||||||
assert.Check(t, strings.Contains(result.Combined(), "default via 2001:db8:abca::254 dev eth0"))
|
assert.Check(t, strings.Contains(result.Combined(), "default via 2001:db8:abca::254 dev eth0"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure Kernel version is >= v3.9 for macvlan support
|
|
||||||
func macvlanKernelSupport() bool {
|
|
||||||
return n.CheckKernelMajorVersionGreaterOrEqualThen(3, 9)
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
package macvlan // import "github.com/docker/docker/integration/network/macvlan"
|
package macvlan // import "github.com/docker/docker/integration/network/macvlan"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
package macvlan // import "github.com/docker/docker/integration/network/macvlan"
|
Loading…
Reference in New Issue