Remove deprecated environment.ExperimentalDaemon()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
142b1f8bfb
commit
da8032d7d3
8 changed files with 21 additions and 28 deletions
|
@ -129,7 +129,7 @@ func (s *DockerRegistrySuite) SetUpTest(c *check.C) {
|
|||
testRequires(c, DaemonIsLinux, registry.Hosting, SameHostDaemon)
|
||||
s.reg = setupRegistry(c, false, "", "")
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ func (s *DockerSchema1RegistrySuite) SetUpTest(c *check.C) {
|
|||
testRequires(c, DaemonIsLinux, registry.Hosting, NotArm64, SameHostDaemon)
|
||||
s.reg = setupRegistry(c, true, "", "")
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ func (s *DockerRegistryAuthHtpasswdSuite) SetUpTest(c *check.C) {
|
|||
testRequires(c, DaemonIsLinux, registry.Hosting, SameHostDaemon)
|
||||
s.reg = setupRegistry(c, false, "htpasswd", "")
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ func (s *DockerRegistryAuthTokenSuite) OnTimeout(c *check.C) {
|
|||
func (s *DockerRegistryAuthTokenSuite) SetUpTest(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux, registry.Hosting, SameHostDaemon)
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ func (s *DockerDaemonSuite) OnTimeout(c *check.C) {
|
|||
func (s *DockerDaemonSuite) SetUpTest(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux, SameHostDaemon)
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ func (s *DockerSwarmSuite) SetUpTest(c *check.C) {
|
|||
func (s *DockerSwarmSuite) AddDaemon(c *check.C, joinSwarm, manager bool) *daemon.Swarm {
|
||||
d := &daemon.Swarm{
|
||||
Daemon: daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
}),
|
||||
Port: defaultSwarmPort + s.portIndex,
|
||||
}
|
||||
|
|
|
@ -1434,7 +1434,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithSocketAsVolume(c *check.C) {
|
|||
// A subsequent daemon restart should clean up said mounts.
|
||||
func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *check.C) {
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
d.StartWithBusybox(c)
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec
|
|||
// os.Interrupt should perform a graceful daemon shutdown and hence cleanup mounts.
|
||||
func (s *DockerDaemonSuite) TestCleanupMountsAfterGracefulShutdown(c *check.C) {
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
d.StartWithBusybox(c)
|
||||
|
||||
|
@ -1695,7 +1695,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartLocalVolumes(c *check.C) {
|
|||
// FIXME(vdemeester) should be a unit test
|
||||
func (s *DockerDaemonSuite) TestDaemonCorruptedLogDriverAddress(c *check.C) {
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
c.Assert(d.StartWithError("--log-driver=syslog", "--log-opt", "syslog-address=corrupted:42"), check.NotNil)
|
||||
expected := "Failed to set log opts: syslog-address should be in form proto://address"
|
||||
|
@ -1705,7 +1705,7 @@ func (s *DockerDaemonSuite) TestDaemonCorruptedLogDriverAddress(c *check.C) {
|
|||
// FIXME(vdemeester) should be a unit test
|
||||
func (s *DockerDaemonSuite) TestDaemonCorruptedFluentdAddress(c *check.C) {
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
c.Assert(d.StartWithError("--log-driver=fluentd", "--log-opt", "fluentd-address=corrupted:c"), check.NotNil)
|
||||
expected := "Failed to set log opts: invalid fluentd-address corrupted:c: "
|
||||
|
@ -3082,7 +3082,7 @@ func (s *DockerDaemonSuite) TestDaemonIpcModeShareableFromConfig(c *check.C) {
|
|||
|
||||
func testDaemonStartIpcMode(c *check.C, from, mode string, valid bool) {
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
c.Logf("Checking IpcMode %s set from %s\n", mode, from)
|
||||
var serr error
|
||||
|
|
|
@ -53,7 +53,7 @@ type graphEventsCounter struct {
|
|||
|
||||
func (s *DockerExternalGraphdriverSuite) SetUpTest(c *check.C) {
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ type DockerExternalVolumeSuite struct {
|
|||
func (s *DockerExternalVolumeSuite) SetUpTest(c *check.C) {
|
||||
testRequires(c, SameHostDaemon)
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
s.ec = &eventCounter{}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ func (s *DockerSuite) TestInfoEnsureSucceeds(c *check.C) {
|
|||
stringsToCheck = append(stringsToCheck, "Runtimes:", "Default Runtime: runc")
|
||||
}
|
||||
|
||||
if testEnv.ExperimentalDaemon() {
|
||||
if testEnv.DaemonInfo.ExperimentalBuild {
|
||||
stringsToCheck = append(stringsToCheck, "Experimental: true")
|
||||
} else {
|
||||
stringsToCheck = append(stringsToCheck, "Experimental: false")
|
||||
|
@ -72,7 +72,7 @@ func (s *DockerSuite) TestInfoDiscoveryBackend(c *check.C) {
|
|||
testRequires(c, SameHostDaemon, DaemonIsLinux)
|
||||
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
discoveryBackend := "consul://consuladdr:consulport/some/path"
|
||||
discoveryAdvertise := "1.1.1.1:2375"
|
||||
|
@ -91,7 +91,7 @@ func (s *DockerSuite) TestInfoDiscoveryInvalidAdvertise(c *check.C) {
|
|||
testRequires(c, SameHostDaemon, DaemonIsLinux)
|
||||
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
discoveryBackend := "consul://consuladdr:consulport/some/path"
|
||||
|
||||
|
@ -110,7 +110,7 @@ func (s *DockerSuite) TestInfoDiscoveryAdvertiseInterfaceName(c *check.C) {
|
|||
testRequires(c, SameHostDaemon, Network, DaemonIsLinux)
|
||||
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
discoveryBackend := "consul://consuladdr:consulport/some/path"
|
||||
discoveryAdvertise := "eth0"
|
||||
|
@ -183,7 +183,7 @@ func (s *DockerSuite) TestInfoDebug(c *check.C) {
|
|||
testRequires(c, SameHostDaemon, DaemonIsLinux)
|
||||
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
d.Start(c, "--debug")
|
||||
defer d.Stop(c)
|
||||
|
@ -206,7 +206,7 @@ func (s *DockerSuite) TestInsecureRegistries(c *check.C) {
|
|||
registryHost := "insecurehost.com:5000"
|
||||
|
||||
d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
d.Start(c, "--insecure-registry="+registryCIDR, "--insecure-registry="+registryHost)
|
||||
defer d.Stop(c)
|
||||
|
|
|
@ -50,7 +50,7 @@ type DockerNetworkSuite struct {
|
|||
|
||||
func (s *DockerNetworkSuite) SetUpTest(c *check.C) {
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ func newDockerHubPullSuite() *DockerHubPullSuite {
|
|||
func (s *DockerHubPullSuite) SetUpSuite(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux, SameHostDaemon)
|
||||
s.d = daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{
|
||||
Experimental: testEnv.ExperimentalDaemon(),
|
||||
Experimental: testEnv.DaemonInfo.ExperimentalBuild,
|
||||
})
|
||||
s.d.Start(c)
|
||||
}
|
||||
|
|
|
@ -49,13 +49,6 @@ func New() (*Execution, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
// ExperimentalDaemon tell whether the main daemon has
|
||||
// experimental features enabled or not
|
||||
// Deprecated: use DaemonInfo.ExperimentalBuild
|
||||
func (e *Execution) ExperimentalDaemon() bool {
|
||||
return e.DaemonInfo.ExperimentalBuild
|
||||
}
|
||||
|
||||
// DaemonPlatform is held globally so that tests can make intelligent
|
||||
// decisions on how to configure themselves according to the platform
|
||||
// of the daemon. This is initialized in docker_utils by sending
|
||||
|
|
Loading…
Reference in a new issue