Improve consistency in "skip"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a3948d17d3
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e438d4799d
commit
cdedf9ae3e
12 changed files with 19 additions and 20 deletions
|
@ -29,7 +29,6 @@ import (
|
||||||
func TestContainerStartOnDaemonRestart(t *testing.T) {
|
func TestContainerStartOnDaemonRestart(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon, "cannot start daemon on remote test run")
|
skip.If(t, testEnv.IsRemoteDaemon, "cannot start daemon on remote test run")
|
||||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon(), "cannot start daemon on remote test run")
|
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
|
|
|
@ -58,7 +58,7 @@ func TestExportContainerAndImportImage(t *testing.T) {
|
||||||
// condition, daemon restart is needed after container creation.
|
// condition, daemon restart is needed after container creation.
|
||||||
func TestExportContainerAfterDaemonRestart(t *testing.T) {
|
func TestExportContainerAfterDaemonRestart(t *testing.T) {
|
||||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
|
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
c := d.NewClientT(t)
|
c := d.NewClientT(t)
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLinksEtcHostsContentMatch(t *testing.T) {
|
func TestLinksEtcHostsContentMatch(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
|
|
||||||
hosts, err := ioutil.ReadFile("/etc/hosts")
|
hosts, err := ioutil.ReadFile("/etc/hosts")
|
||||||
skip.If(t, os.IsNotExist(err))
|
skip.If(t, os.IsNotExist(err))
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
// Makes sure that when following we don't get an EOF error when there are no logs
|
// Makes sure that when following we don't get an EOF error when there are no logs
|
||||||
func TestLogsFollowTailEmpty(t *testing.T) {
|
func TestLogsFollowTailEmpty(t *testing.T) {
|
||||||
// FIXME(vdemeester) fails on a e2e run on linux...
|
// FIXME(vdemeester) fails on a e2e run on linux...
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
client := testEnv.APIClient()
|
client := testEnv.APIClient()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
|
|
||||||
func TestNetworkNat(t *testing.T) {
|
func TestNetworkNat(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ func TestNetworkNat(t *testing.T) {
|
||||||
|
|
||||||
func TestNetworkLocalhostTCPNat(t *testing.T) {
|
func TestNetworkLocalhostTCPNat(t *testing.T) {
|
||||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "FIXME")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ func TestNetworkLocalhostTCPNat(t *testing.T) {
|
||||||
|
|
||||||
func TestNetworkLoopbackNat(t *testing.T) {
|
func TestNetworkLoopbackNat(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) {
|
||||||
|
|
||||||
// Test case for #5244: `docker rm` fails if bind dir doesn't exist anymore
|
// Test case for #5244: `docker rm` fails if bind dir doesn't exist anymore
|
||||||
func TestRemoveContainerWithRemovedVolume(t *testing.T) {
|
func TestRemoveContainerWithRemovedVolume(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
|
@ -190,7 +190,7 @@ func TestRenameContainerWithSameName(t *testing.T) {
|
||||||
// of the linked container should be updated so that the other
|
// of the linked container should be updated so that the other
|
||||||
// container could still reference to the container that is renamed.
|
// container could still reference to the container that is renamed.
|
||||||
func TestRenameContainerWithLinkedContainer(t *testing.T) {
|
func TestRenameContainerWithLinkedContainer(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
skip.If(t, testEnv.OSType == "windows", "FIXME")
|
||||||
|
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
func TestDockerNetworkIpvlanPersistance(t *testing.T) {
|
func TestDockerNetworkIpvlanPersistance(t *testing.T) {
|
||||||
// verify the driver automatically provisions the 802.1q link (di-dummy0.70)
|
// verify the driver automatically provisions the 802.1q link (di-dummy0.70)
|
||||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, !ipvlanKernelSupport(), "Kernel doesn't support ipvlan")
|
skip.If(t, !ipvlanKernelSupport(), "Kernel doesn't support ipvlan")
|
||||||
|
|
||||||
d := daemon.New(t, daemon.WithExperimental)
|
d := daemon.New(t, daemon.WithExperimental)
|
||||||
|
@ -48,7 +48,7 @@ func TestDockerNetworkIpvlanPersistance(t *testing.T) {
|
||||||
|
|
||||||
func TestDockerNetworkIpvlan(t *testing.T) {
|
func TestDockerNetworkIpvlan(t *testing.T) {
|
||||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, !ipvlanKernelSupport(), "Kernel doesn't support ipvlan")
|
skip.If(t, !ipvlanKernelSupport(), "Kernel doesn't support ipvlan")
|
||||||
|
|
||||||
for _, tc := range []struct {
|
for _, tc := range []struct {
|
||||||
|
|
|
@ -19,7 +19,7 @@ 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")
|
skip.If(t, !macvlanKernelSupport(), "Kernel doesn't support macvlan")
|
||||||
|
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
|
@ -42,7 +42,7 @@ 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")
|
skip.If(t, !macvlanKernelSupport(), "Kernel doesn't support macvlan")
|
||||||
|
|
||||||
for _, tc := range []struct {
|
for _, tc := range []struct {
|
||||||
|
|
|
@ -27,7 +27,7 @@ func delInterface(t *testing.T, ifName string) {
|
||||||
|
|
||||||
func TestDaemonRestartWithLiveRestore(t *testing.T) {
|
func TestDaemonRestartWithLiveRestore(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows")
|
skip.If(t, testEnv.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
defer d.Stop(t)
|
defer d.Stop(t)
|
||||||
|
@ -50,7 +50,7 @@ func TestDaemonRestartWithLiveRestore(t *testing.T) {
|
||||||
func TestDaemonDefaultNetworkPools(t *testing.T) {
|
func TestDaemonDefaultNetworkPools(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows")
|
skip.If(t, testEnv.OSType == "windows")
|
||||||
// Remove docker0 bridge and the start daemon defining the predefined address pools
|
// Remove docker0 bridge and the start daemon defining the predefined address pools
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
||||||
defaultNetworkBridge := "docker0"
|
defaultNetworkBridge := "docker0"
|
||||||
delInterface(t, defaultNetworkBridge)
|
delInterface(t, defaultNetworkBridge)
|
||||||
|
@ -92,7 +92,7 @@ func TestDaemonDefaultNetworkPools(t *testing.T) {
|
||||||
|
|
||||||
func TestDaemonRestartWithExistingNetwork(t *testing.T) {
|
func TestDaemonRestartWithExistingNetwork(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows")
|
skip.If(t, testEnv.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
||||||
defaultNetworkBridge := "docker0"
|
defaultNetworkBridge := "docker0"
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
|
@ -125,7 +125,7 @@ func TestDaemonRestartWithExistingNetwork(t *testing.T) {
|
||||||
|
|
||||||
func TestDaemonRestartWithExistingNetworkWithDefaultPoolRange(t *testing.T) {
|
func TestDaemonRestartWithExistingNetworkWithDefaultPoolRange(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows")
|
skip.If(t, testEnv.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
||||||
defaultNetworkBridge := "docker0"
|
defaultNetworkBridge := "docker0"
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
|
@ -175,7 +175,7 @@ func TestDaemonRestartWithExistingNetworkWithDefaultPoolRange(t *testing.T) {
|
||||||
|
|
||||||
func TestDaemonWithBipAndDefaultNetworkPool(t *testing.T) {
|
func TestDaemonWithBipAndDefaultNetworkPool(t *testing.T) {
|
||||||
skip.If(t, testEnv.OSType == "windows")
|
skip.If(t, testEnv.OSType == "windows")
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "skip test from new feature")
|
||||||
defaultNetworkBridge := "docker0"
|
defaultNetworkBridge := "docker0"
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestContinueAfterPluginCrash(t *testing.T) {
|
func TestContinueAfterPluginCrash(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon(), "test requires daemon on the same host")
|
skip.If(t, testEnv.IsRemoteDaemon, "test requires daemon on the same host")
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
d := daemon.New(t)
|
d := daemon.New(t)
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestInspect(t *testing.T) {
|
func TestInspect(t *testing.T) {
|
||||||
skip.If(t, testEnv.IsRemoteDaemon())
|
skip.If(t, testEnv.IsRemoteDaemon)
|
||||||
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
|
||||||
defer setupTest(t)()
|
defer setupTest(t)()
|
||||||
d := swarm.NewSwarm(t, testEnv)
|
d := swarm.NewSwarm(t, testEnv)
|
||||||
|
|
Loading…
Add table
Reference in a new issue