Prechádzať zdrojové kódy

Always execute tests and skip in tests themselves

See issue #40193

Signed-off-by: Sam Whited <sam@samwhited.com>
Sam Whited 5 rokov pred
rodič
commit
a6f99232f5

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

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

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

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