Prechádzať zdrojové kódy

Merge pull request #38567 from thaJeztah/use_the_skip

TestCgroupDriverSystemdMemoryLimit: use skip.If()
Vincent Demeester 6 rokov pred
rodič
commit
b5be9f63eb

+ 1 - 4
integration/system/cgroupdriver_systemd_test.go

@@ -29,12 +29,9 @@ func hasSystemd() bool {
 //  https://github.com/moby/moby/issues/35123
 func TestCgroupDriverSystemdMemoryLimit(t *testing.T) {
 	skip.If(t, testEnv.DaemonInfo.OSType == "windows")
+	skip.If(t, !hasSystemd())
 	t.Parallel()
 
-	if !hasSystemd() {
-		t.Skip("systemd not available")
-	}
-
 	d := daemon.New(t)
 	c := d.NewClientT(t)