Browse code

Add requirements for tests that require network

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2016/10/12 07:17:20
Showing 3 changed files
... ...
@@ -800,6 +800,7 @@ func (s *DockerSwarmSuite) TestAPISwarmLeaveRemovesContainer(c *check.C) {
800 800
 
801 801
 // #23629
802 802
 func (s *DockerSwarmSuite) TestAPISwarmLeaveOnPendingJoin(c *check.C) {
803
+	testRequires(c, Network)
803 804
 	s.AddDaemon(c, true, true)
804 805
 	d2 := s.AddDaemon(c, false, false)
805 806
 
... ...
@@ -828,6 +829,7 @@ func (s *DockerSwarmSuite) TestAPISwarmLeaveOnPendingJoin(c *check.C) {
828 828
 
829 829
 // #23705
830 830
 func (s *DockerSwarmSuite) TestAPISwarmRestoreOnPendingJoin(c *check.C) {
831
+	testRequires(c, Network)
831 832
 	d := s.AddDaemon(c, false, false)
832 833
 	err := d.Join(swarm.JoinRequest{
833 834
 		RemoteAddrs: []string{"123.123.123.123:1234"},
... ...
@@ -17,6 +17,7 @@ var pluginName = "tiborvass/no-remove"
17 17
 
18 18
 // TestDaemonRestartWithPluginEnabled tests state restore for an enabled plugin
19 19
 func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
20
+	testRequires(c, Network)
20 21
 	if err := s.d.Start(); err != nil {
21 22
 		c.Fatalf("Could not start daemon: %v", err)
22 23
 	}
... ...
@@ -48,6 +49,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
48 48
 
49 49
 // TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin
50 50
 func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
51
+	testRequires(c, Network)
51 52
 	if err := s.d.Start(); err != nil {
52 53
 		c.Fatalf("Could not start daemon: %v", err)
53 54
 	}
... ...
@@ -77,6 +79,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
77 77
 // TestDaemonKillLiveRestoreWithPlugins SIGKILLs daemon started with --live-restore.
78 78
 // Plugins should continue to run.
79 79
 func (s *DockerDaemonSuite) TestDaemonKillLiveRestoreWithPlugins(c *check.C) {
80
+	testRequires(c, Network)
80 81
 	if err := s.d.Start("--live-restore"); err != nil {
81 82
 		c.Fatalf("Could not start daemon: %v", err)
82 83
 	}
... ...
@@ -108,6 +111,7 @@ func (s *DockerDaemonSuite) TestDaemonKillLiveRestoreWithPlugins(c *check.C) {
108 108
 // TestDaemonShutdownLiveRestoreWithPlugins SIGTERMs daemon started with --live-restore.
109 109
 // Plugins should continue to run.
110 110
 func (s *DockerDaemonSuite) TestDaemonShutdownLiveRestoreWithPlugins(c *check.C) {
111
+	testRequires(c, Network)
111 112
 	if err := s.d.Start("--live-restore"); err != nil {
112 113
 		c.Fatalf("Could not start daemon: %v", err)
113 114
 	}
... ...
@@ -138,6 +142,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownLiveRestoreWithPlugins(c *check.C)
138 138
 
139 139
 // TestDaemonShutdownWithPlugins shuts down running plugins.
140 140
 func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
141
+	testRequires(c, Network)
141 142
 	if err := s.d.Start(); err != nil {
142 143
 		c.Fatalf("Could not start daemon: %v", err)
143 144
 	}
... ...
@@ -175,6 +180,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
175 175
 
176 176
 // TestVolumePlugin tests volume creation using a plugin.
177 177
 func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
178
+	testRequires(c, Network)
178 179
 	volName := "plugin-volume"
179 180
 	volRoot := "/data"
180 181
 	destDir := "/tmp/data/"
... ...
@@ -16,7 +16,7 @@ var (
16 16
 )
17 17
 
18 18
 func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
19
-	testRequires(c, DaemonIsLinux, ExperimentalDaemon)
19
+	testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
20 20
 	_, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
21 21
 	c.Assert(err, checker.IsNil)
22 22
 
... ...
@@ -46,7 +46,7 @@ func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
46 46
 }
47 47
 
48 48
 func (s *DockerSuite) TestPluginForceRemove(c *check.C) {
49
-	testRequires(c, DaemonIsLinux, ExperimentalDaemon)
49
+	testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
50 50
 	out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
51 51
 	c.Assert(err, checker.IsNil)
52 52
 
... ...
@@ -59,7 +59,7 @@ func (s *DockerSuite) TestPluginForceRemove(c *check.C) {
59 59
 }
60 60
 
61 61
 func (s *DockerSuite) TestPluginActive(c *check.C) {
62
-	testRequires(c, DaemonIsLinux, ExperimentalDaemon)
62
+	testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
63 63
 	out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
64 64
 	c.Assert(err, checker.IsNil)
65 65
 
... ...
@@ -86,7 +86,7 @@ func (s *DockerSuite) TestPluginActive(c *check.C) {
86 86
 }
87 87
 
88 88
 func (s *DockerSuite) TestPluginInstallDisable(c *check.C) {
89
-	testRequires(c, DaemonIsLinux, ExperimentalDaemon)
89
+	testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
90 90
 	out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
91 91
 	c.Assert(err, checker.IsNil)
92 92
 	c.Assert(strings.TrimSpace(out), checker.Contains, pName)
... ...
@@ -116,7 +116,7 @@ func (s *DockerSuite) TestPluginInstallImage(c *check.C) {
116 116
 }
117 117
 
118 118
 func (s *DockerSuite) TestPluginEnableDisableNegative(c *check.C) {
119
-	testRequires(c, DaemonIsLinux, ExperimentalDaemon)
119
+	testRequires(c, DaemonIsLinux, ExperimentalDaemon, Network)
120 120
 	out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pName)
121 121
 	c.Assert(err, checker.IsNil)
122 122
 	c.Assert(strings.TrimSpace(out), checker.Contains, pName)