Skip to content

Commit

Permalink
rename to skipIfTestingOnWindows
Browse files Browse the repository at this point in the history
Signed-off-by: Mayank Shah <[email protected]>
  • Loading branch information
mayankshah1607 committed Sep 6, 2020
1 parent 13ce1cd commit 11f2293
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pkg/azuredisk/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import (
"testing"
)

func skipTestsIfWindows(t *testing.T) {
func skipIfTestingOnWindows(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skipping tests on Windows")
}
}

func TestGetCloudProvider(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
fakeCredFile := "fake-cred-file.json"
fakeKubeConfig := "fake-kube-config"
emptyKubeConfig := "empty-kube-config"
Expand Down
2 changes: 1 addition & 1 deletion pkg/azuredisk/azuredisk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func TestIsAvailabilityZone(t *testing.T) {
}

func TestIsCorruptedDir(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
existingMountPath, err := ioutil.TempDir(os.TempDir(), "csi-mount-test")
if err != nil {
t.Fatalf("failed to create tmp dir: %v", err)
Expand Down
12 changes: 6 additions & 6 deletions pkg/azuredisk/nodeserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func TestNodeStageVolume(t *testing.T) {
}

func TestNodeUnstageVolume(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
errorTarget := "./error_is_likely_target"
targetFile := "./abc.go"
tests := []struct {
Expand Down Expand Up @@ -375,7 +375,7 @@ func TestNodeUnstageVolume(t *testing.T) {
}

func TestNodePublishVolume(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
volumeCap := csi.VolumeCapability_AccessMode{Mode: csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER}
publishContext := map[string]string{
LUN: "/dev/01",
Expand Down Expand Up @@ -501,7 +501,7 @@ func TestNodePublishVolume(t *testing.T) {
}

func TestNodeUnpublishVolume(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
errorTarget := "./error_is_likely_target"
targetFile := "./abc.go"
tests := []struct {
Expand Down Expand Up @@ -554,7 +554,7 @@ func TestNodeUnpublishVolume(t *testing.T) {
}

func TestNodeExpandVolume(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
d, _ := NewFakeDriver(t)
stdCapacityRange = &csi.CapacityRange{
RequiredBytes: volumehelper.GiBToBytes(15),
Expand Down Expand Up @@ -589,7 +589,7 @@ func TestNodeExpandVolume(t *testing.T) {
}

func TestGetBlockSizeBytes(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
d, _ := NewFakeDriver(t)
testTarget := "./test"
tests := []struct {
Expand Down Expand Up @@ -622,7 +622,7 @@ func TestGetBlockSizeBytes(t *testing.T) {
}

func TestEnsureBlockTargetFile(t *testing.T) {
skipTestsIfWindows(t)
skipIfTestingOnWindows(t)
testTarget := "./test"
d, _ := NewFakeDriver(t)
tests := []struct {
Expand Down

0 comments on commit 11f2293

Please sign in to comment.