|
@@ -32,6 +32,7 @@ import (
|
|
|
"github.com/docker/docker/integration-cli/checker"
|
|
|
"github.com/docker/docker/integration-cli/cli"
|
|
|
"github.com/docker/docker/integration-cli/daemon"
|
|
|
+ testdaemon "github.com/docker/docker/internal/test/daemon"
|
|
|
"github.com/docker/docker/opts"
|
|
|
"github.com/docker/docker/pkg/mount"
|
|
|
"github.com/docker/docker/pkg/stringid"
|
|
@@ -1432,9 +1433,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithSocketAsVolume(c *check.C) {
|
|
|
// os.Kill should kill daemon ungracefully, leaving behind container mounts.
|
|
|
// 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.DaemonInfo.ExperimentalBuild,
|
|
|
- })
|
|
|
+ d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution))
|
|
|
d.StartWithBusybox(c)
|
|
|
|
|
|
out, err := d.Cmd("run", "-d", "busybox", "top")
|
|
@@ -1472,9 +1471,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.DaemonInfo.ExperimentalBuild,
|
|
|
- })
|
|
|
+ d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution))
|
|
|
d.StartWithBusybox(c)
|
|
|
|
|
|
out, err := d.Cmd("run", "-d", "busybox", "top")
|
|
@@ -1693,9 +1690,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.DaemonInfo.ExperimentalBuild,
|
|
|
- })
|
|
|
+ d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution))
|
|
|
c.Assert(d.StartWithError("--log-driver=syslog", "--log-opt", "syslog-address=corrupted:42"), check.NotNil)
|
|
|
expected := "syslog-address should be in form proto://address"
|
|
|
icmd.RunCommand("grep", expected, d.LogFileName()).Assert(c, icmd.Success)
|
|
@@ -1703,9 +1698,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.DaemonInfo.ExperimentalBuild,
|
|
|
- })
|
|
|
+ d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution))
|
|
|
c.Assert(d.StartWithError("--log-driver=fluentd", "--log-opt", "fluentd-address=corrupted:c"), check.NotNil)
|
|
|
expected := "invalid fluentd-address corrupted:c: "
|
|
|
icmd.RunCommand("grep", expected, d.LogFileName()).Assert(c, icmd.Success)
|
|
@@ -3080,9 +3073,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.DaemonInfo.ExperimentalBuild,
|
|
|
- })
|
|
|
+ d := daemon.New(c, dockerBinary, dockerdBinary, testdaemon.WithEnvironment(testEnv.Execution))
|
|
|
c.Logf("Checking IpcMode %s set from %s\n", mode, from)
|
|
|
var serr error
|
|
|
switch from {
|
|
@@ -3183,7 +3174,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartIpcMode(c *check.C) {
|
|
|
// the daemon from starting
|
|
|
func (s *DockerDaemonSuite) TestFailedPluginRemove(c *check.C) {
|
|
|
testRequires(c, DaemonIsLinux, IsAmd64, SameHostDaemon)
|
|
|
- d := daemon.New(c, dockerBinary, dockerdBinary, daemon.Config{})
|
|
|
+ d := daemon.New(c, dockerBinary, dockerdBinary)
|
|
|
d.Start(c)
|
|
|
cli, err := client.NewClient(d.Sock(), api.DefaultVersion, nil, nil)
|
|
|
c.Assert(err, checker.IsNil)
|