瀏覽代碼

Merge pull request #19715 from coolljt0725/fix_test_daemon

Test utils: fix daemon start utils
Doug Davis 9 年之前
父節點
當前提交
fc8e344297
共有 1 個文件被更改,包括 8 次插入5 次删除
  1. 8 5
      integration-cli/docker_utils.go

+ 8 - 5
integration-cli/docker_utils.go

@@ -224,17 +224,20 @@ func (d *Daemon) Start(arg ...string) error {
 
 	// If we don't explicitly set the log-level or debug flag(-D) then
 	// turn on debug mode
-	foundIt := false
+	foundLog := false
+	foundSd := false
 	for _, a := range arg {
 		if strings.Contains(a, "--log-level") || strings.Contains(a, "-D") || strings.Contains(a, "--debug") {
-			foundIt = true
+			foundLog = true
+		}
+		if strings.Contains(a, "--storage-driver") {
+			foundSd = true
 		}
 	}
-	if !foundIt {
+	if !foundLog {
 		args = append(args, "--debug")
 	}
-
-	if d.storageDriver != "" {
+	if d.storageDriver != "" && !foundSd {
 		args = append(args, "--storage-driver", d.storageDriver)
 	}