1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #37169 from AntaresS/add-version-checking

add api version checking for tests from new feature
This commit is contained in:
Tibor Vass 2018-05-30 09:58:45 -10:00 committed by GitHub
commit 0a94468a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)