add api version checking for tests from new feature
@@ -7,6 +7,7 @@ import (
"github.com/docker/docker/api/types"
swarmtypes "github.com/docker/docker/api/types/swarm"
+ "github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/swarm"
"github.com/docker/docker/internal/test/daemon"
@@ -24,7 +25,7 @@ func delInterface(t *testing.T, ifName string) {
}
func TestDaemonRestartWithLiveRestore(t *testing.T) {
- skip.If(t, testEnv.IsRemoteDaemon())
+ skip.If(t, testEnv.IsRemoteDaemon(), versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"))
d := daemon.New(t)
defer d.Stop(t)
d.Start(t)
@@ -44,7 +45,7 @@ func TestDaemonRestartWithLiveRestore(t *testing.T) {
func TestDaemonDefaultNetworkPools(t *testing.T) {
// Remove docker0 bridge and the start daemon defining the predefined address pools
- skip.If(t, testEnv.IsRemoteDaemon())
+ skip.If(t, testEnv.IsRemoteDaemon(), versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"))
defaultNetworkBridge := "docker0"
delInterface(t, defaultNetworkBridge)
d := daemon.New(t)
@@ -89,7 +90,7 @@ func TestDaemonDefaultNetworkPools(t *testing.T) {
}
func TestDaemonRestartWithExistingNetwork(t *testing.T) {
- skip.If(t, testEnv.IsRemoteDaemon())
+ skip.If(t, testEnv.IsRemoteDaemon(), versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"))
defaultNetworkBridge := "docker0"
d := daemon.New(t)
d.Start(t)
@@ -123,7 +124,7 @@ func TestDaemonRestartWithExistingNetwork(t *testing.T) {
}
func TestDaemonRestartWithExistingNetworkWithDefaultPoolRange(t *testing.T) {
- skip.If(t, testEnv.IsRemoteDaemon())
+ skip.If(t, testEnv.IsRemoteDaemon(), versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"))
defaultNetworkBridge := "docker0"
d := daemon.New(t)
d.Start(t)
@@ -179,7 +180,7 @@ func TestDaemonRestartWithExistingNetworkWithDefaultPoolRange(t *testing.T) {
}
func TestDaemonWithBipAndDefaultNetworkPool(t *testing.T) {
- skip.If(t, testEnv.IsRemoteDaemon())
+ skip.If(t, testEnv.IsRemoteDaemon(), versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"))
defaultNetworkBridge := "docker0"
d := daemon.New(t)
defer d.Stop(t)
