1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Remove SameHostDaemon, use testEnv.IsLocalDaemon instead

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2018-12-24 13:25:53 +01:00
parent 362f737e1c
commit 43b15e924f
36 changed files with 172 additions and 176 deletions

View File

@ -413,7 +413,7 @@ func (s *DockerDaemonSuite) TestDaemonIPv6Enabled(c *check.C) {
// that running containers are given a link-local and global IPv6 address
func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDR(c *check.C) {
// IPv6 setup is messing with local bridge address.
testRequires(c, SameHostDaemon)
testRequires(c, testEnv.IsLocalDaemon)
// Delete the docker0 bridge if its left around from previous daemon. It has to be recreated with
// ipv6 enabled
deleteInterface(c, "docker0")
@ -440,7 +440,7 @@ func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDR(c *check.C) {
// the running containers are given an IPv6 address derived from the MAC address and the ipv6 fixed CIDR
func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDRAndMac(c *check.C) {
// IPv6 setup is messing with local bridge address.
testRequires(c, SameHostDaemon)
testRequires(c, testEnv.IsLocalDaemon)
// Delete the docker0 bridge if its left around from previous daemon. It has to be recreated with
// ipv6 enabled
deleteInterface(c, "docker0")
@ -458,7 +458,7 @@ func (s *DockerDaemonSuite) TestDaemonIPv6FixedCIDRAndMac(c *check.C) {
// TestDaemonIPv6HostMode checks that when the running a container with
// network=host the host ipv6 addresses are not removed
func (s *DockerDaemonSuite) TestDaemonIPv6HostMode(c *check.C) {
testRequires(c, SameHostDaemon)
testRequires(c, testEnv.IsLocalDaemon)
deleteInterface(c, "docker0")
s.d.StartWithBusybox(c, "--ipv6", "--fixed-cidr-v6=2001:db8:2::/64")
@ -822,7 +822,7 @@ func (s *DockerDaemonSuite) TestDaemonDefaultGatewayIPv4ExplicitOutsideContainer
}
func (s *DockerDaemonSuite) TestDaemonDefaultNetworkInvalidClusterConfig(c *check.C) {
testRequires(c, DaemonIsLinux, SameHostDaemon)
testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon)
// Start daemon without docker0 bridge
defaultNetworkBridge := "docker0"
@ -1770,7 +1770,7 @@ func (s *DockerDaemonSuite) TestBridgeIPIsExcludedFromAllocatorPool(c *check.C)
// Test daemon for no space left on device error
func (s *DockerDaemonSuite) TestDaemonNoSpaceLeftOnDeviceError(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux, Network)
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux, Network)
testDir, err := ioutil.TempDir("", "no-space-left-on-device-test")
c.Assert(err, checker.IsNil)
@ -2203,7 +2203,7 @@ func (s *DockerDaemonSuite) TestDaemonDebugLog(c *check.C) {
}
func (s *DockerDaemonSuite) TestDaemonDiscoveryBackendConfigReload(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux)
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux)
// daemon config file
daemonConfig := `{ "debug" : false }`
@ -2274,7 +2274,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrency(c *check.C) {
// Test case for #20936, #22443
func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFile(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux)
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux)
// daemon config file
configFilePath := "test.json"
@ -2315,7 +2315,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFile(c *check.C) {
// Test case for #20936, #22443
func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFileReload(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux)
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux)
// daemon config file
configFilePath := "test.json"
@ -2387,7 +2387,7 @@ func (s *DockerDaemonSuite) TestBuildOnDisabledBridgeNetworkDaemon(c *check.C) {
// Test case for #21976
func (s *DockerDaemonSuite) TestDaemonDNSFlagsInHostMode(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux)
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux)
s.d.StartWithBusybox(c, "--dns", "1.2.3.4", "--dns-search", "example.com", "--dns-opt", "timeout:3")
@ -2643,7 +2643,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartSaveContainerExitCode(c *check.C) {
}
func (s *DockerDaemonSuite) TestDaemonWithUserlandProxyPath(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux)
testRequires(c, testEnv.IsLocalDaemon, DaemonIsLinux)
dockerProxyPath, err := exec.LookPath("docker-proxy")
c.Assert(err, checker.IsNil)
@ -2674,7 +2674,7 @@ func (s *DockerDaemonSuite) TestDaemonWithUserlandProxyPath(c *check.C) {
// Test case for #22471
func (s *DockerDaemonSuite) TestDaemonShutdownTimeout(c *check.C) {
testRequires(c, SameHostDaemon)
testRequires(c, testEnv.IsLocalDaemon)
s.d.StartWithBusybox(c, "--shutdown-timeout=3")
_, err := s.d.Cmd("run", "-d", "busybox", "top")
@ -2695,7 +2695,7 @@ func (s *DockerDaemonSuite) TestDaemonShutdownTimeout(c *check.C) {
// Test case for #22471
func (s *DockerDaemonSuite) TestDaemonShutdownTimeoutWithConfigFile(c *check.C) {
testRequires(c, SameHostDaemon)
testRequires(c, testEnv.IsLocalDaemon)
// daemon config file
configFilePath := "test.json"
@ -2757,7 +2757,7 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *check.C) {
}
func (s *DockerDaemonSuite) TestRemoveContainerAfterLiveRestore(c *check.C) {
testRequires(c, DaemonIsLinux, overlayFSSupported, SameHostDaemon)
testRequires(c, DaemonIsLinux, overlayFSSupported, testEnv.IsLocalDaemon)
s.d.StartWithBusybox(c, "--live-restore", "--storage-driver", "overlay")
out, err := s.d.Cmd("run", "-d", "--name=top", "busybox", "top")
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
@ -2790,7 +2790,7 @@ func (s *DockerDaemonSuite) TestRemoveContainerAfterLiveRestore(c *check.C) {
// #29598
func (s *DockerDaemonSuite) TestRestartPolicyWithLiveRestore(c *check.C) {
testRequires(c, DaemonIsLinux, SameHostDaemon)
testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon)
s.d.StartWithBusybox(c, "--live-restore")
out, err := s.d.Cmd("run", "-d", "--restart", "always", "busybox", "top")
@ -2939,7 +2939,7 @@ func testDaemonStartIpcMode(c *check.C, from, mode string, valid bool) {
// arguments for default IPC mode, and bails out with incorrect ones.
// Both CLI option (--default-ipc-mode) and config parameter are tested.
func (s *DockerDaemonSuite) TestDaemonStartWithIpcModes(c *check.C) {
testRequires(c, DaemonIsLinux, SameHostDaemon)
testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon)
ipcModes := []struct {
mode string
@ -3004,7 +3004,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartIpcMode(c *check.C) {
// TestFailedPluginRemove makes sure that a failed plugin remove does not block
// the daemon from starting
func (s *DockerDaemonSuite) TestFailedPluginRemove(c *check.C) {
testRequires(c, DaemonIsLinux, IsAmd64, SameHostDaemon)
testRequires(c, DaemonIsLinux, IsAmd64, testEnv.IsLocalDaemon)
d := daemon.New(c, dockerBinary, dockerdBinary)
d.Start(c)
cli, err := client.NewClient(d.Sock(), api.DefaultVersion, nil, nil)