瀏覽代碼

Always execute tests and skip in tests themselves

See issue #40193

Signed-off-by: Sam Whited <sam@samwhited.com>
Sam Whited 5 年之前
父節點
當前提交
a6f99232f5
共有 2 個文件被更改,包括 6 次插入8 次删除
  1. 0 3
      integration/plugin/logging/main_test.go
  2. 6 5
      integration/plugin/logging/read_test.go

+ 0 - 3
integration/plugin/logging/main_test.go

@@ -19,9 +19,6 @@ func TestMain(m *testing.M) {
 		fmt.Println(err)
 		os.Exit(1)
 	}
-	if testEnv.OSType != "linux" {
-		os.Exit(0)
-	}
 	err = environment.EnsureFrozenImagesLinux(testEnv)
 	if err != nil {
 		fmt.Println(err)

+ 6 - 5
integration/plugin/logging/read_test.go

@@ -2,13 +2,11 @@ package logging
 
 import (
 	"bytes"
-	"testing"
-
 	"context"
-
-	"time"
-
+	"runtime"
 	"strings"
+	"testing"
+	"time"
 
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types/container"
@@ -19,6 +17,9 @@ import (
 
 // TestReadPluginNoRead tests that reads are supported even if the plugin isn't capable.
 func TestReadPluginNoRead(t *testing.T) {
+	if runtime.GOOS == "windows" {
+		t.Skip("no unix domain sockets on Windows")
+	}
 	t.Parallel()
 	d := daemon.New(t)
 	d.StartWithBusybox(t, "--iptables=false")