Browse code

Always execute tests and skip in tests themselves

See issue #40193

Signed-off-by: Sam Whited <sam@samwhited.com>

Sam Whited authored on 2020/02/20 07:03:45
Showing 2 changed files
... ...
@@ -19,9 +19,6 @@ func TestMain(m *testing.M) {
19 19
 		fmt.Println(err)
20 20
 		os.Exit(1)
21 21
 	}
22
-	if testEnv.OSType != "linux" {
23
-		os.Exit(0)
24
-	}
25 22
 	err = environment.EnsureFrozenImagesLinux(testEnv)
26 23
 	if err != nil {
27 24
 		fmt.Println(err)
... ...
@@ -2,13 +2,11 @@ package logging
2 2
 
3 3
 import (
4 4
 	"bytes"
5
-	"testing"
6
-
7 5
 	"context"
8
-
9
-	"time"
10
-
6
+	"runtime"
11 7
 	"strings"
8
+	"testing"
9
+	"time"
12 10
 
13 11
 	"github.com/docker/docker/api/types"
14 12
 	"github.com/docker/docker/api/types/container"
... ...
@@ -19,6 +17,9 @@ import (
19 19
 
20 20
 // TestReadPluginNoRead tests that reads are supported even if the plugin isn't capable.
21 21
 func TestReadPluginNoRead(t *testing.T) {
22
+	if runtime.GOOS == "windows" {
23
+		t.Skip("no unix domain sockets on Windows")
24
+	}
22 25
 	t.Parallel()
23 26
 	d := daemon.New(t)
24 27
 	d.StartWithBusybox(t, "--iptables=false")