Browse code

integration-cli: remove not necessary -d

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

Antonio Murdaca authored on 2016/02/28 02:07:39
Showing 3 changed files
... ...
@@ -41,7 +41,7 @@ func (s *DockerSuite) TestVolumesApiCreate(c *check.C) {
41 41
 
42 42
 func (s *DockerSuite) TestVolumesApiRemove(c *check.C) {
43 43
 	prefix, _ := getPrefixAndSlashFromDaemonPlatform()
44
-	dockerCmd(c, "run", "-d", "-v", prefix+"/foo", "--name=test", "busybox")
44
+	dockerCmd(c, "run", "-v", prefix+"/foo", "--name=test", "busybox")
45 45
 
46 46
 	status, b, err := sockRequest("GET", "/volumes", nil)
47 47
 	c.Assert(err, checker.IsNil)
... ...
@@ -1278,22 +1278,15 @@ func (s *DockerDaemonSuite) TestDaemonLoggingDriverNoneOverride(c *check.C) {
1278 1278
 }
1279 1279
 
1280 1280
 func (s *DockerDaemonSuite) TestDaemonLoggingDriverNoneLogsError(c *check.C) {
1281
-	if err := s.d.StartWithBusybox("--log-driver=none"); err != nil {
1282
-		c.Fatal(err)
1283
-	}
1281
+	c.Assert(s.d.StartWithBusybox("--log-driver=none"), checker.IsNil)
1284 1282
 
1285
-	out, err := s.d.Cmd("run", "-d", "busybox", "echo", "testline")
1286
-	if err != nil {
1287
-		c.Fatal(out, err)
1288
-	}
1289
-	id := strings.TrimSpace(out)
1290
-	out, err = s.d.Cmd("logs", id)
1291
-	if err == nil {
1292
-		c.Fatalf("Logs should fail with 'none' driver")
1293
-	}
1294
-	if !strings.Contains(out, `"logs" command is supported only for "json-file" and "journald" logging drivers (got: none)`) {
1295
-		c.Fatalf("There should be an error about none not being a recognized log driver, got: %s", out)
1296
-	}
1283
+	out, err := s.d.Cmd("run", "--name=test", "busybox", "echo", "testline")
1284
+	c.Assert(err, checker.IsNil, check.Commentf(out))
1285
+
1286
+	out, err = s.d.Cmd("logs", "test")
1287
+	c.Assert(err, check.NotNil, check.Commentf("Logs should fail with 'none' driver"))
1288
+	expected := `"logs" command is supported only for "json-file" and "journald" logging drivers (got: none)`
1289
+	c.Assert(out, checker.Contains, expected)
1297 1290
 }
1298 1291
 
1299 1292
 func (s *DockerDaemonSuite) TestDaemonDots(c *check.C) {
... ...
@@ -270,7 +270,7 @@ func (s DockerExternalVolumeSuite) TestExternalVolumeDriverVolumesFrom(c *check.
270 270
 	err := s.d.StartWithBusybox()
271 271
 	c.Assert(err, checker.IsNil)
272 272
 
273
-	out, err := s.d.Cmd("run", "-d", "--name", "vol-test1", "-v", "/foo", "--volume-driver", "test-external-volume-driver", "busybox:latest")
273
+	out, err := s.d.Cmd("run", "--name", "vol-test1", "-v", "/foo", "--volume-driver", "test-external-volume-driver", "busybox:latest")
274 274
 	c.Assert(err, checker.IsNil, check.Commentf(out))
275 275
 
276 276
 	out, err = s.d.Cmd("run", "--rm", "--volumes-from", "vol-test1", "--name", "vol-test2", "busybox", "ls", "/tmp")
... ...
@@ -290,7 +290,7 @@ func (s DockerExternalVolumeSuite) TestExternalVolumeDriverDeleteContainer(c *ch
290 290
 	err := s.d.StartWithBusybox()
291 291
 	c.Assert(err, checker.IsNil)
292 292
 
293
-	out, err := s.d.Cmd("run", "-d", "--name", "vol-test1", "-v", "/foo", "--volume-driver", "test-external-volume-driver", "busybox:latest")
293
+	out, err := s.d.Cmd("run", "--name", "vol-test1", "-v", "/foo", "--volume-driver", "test-external-volume-driver", "busybox:latest")
294 294
 	c.Assert(err, checker.IsNil, check.Commentf(out))
295 295
 
296 296
 	out, err = s.d.Cmd("rm", "-fv", "vol-test1")