@@ -21,6 +21,7 @@ import (
21
21
"fmt"
22
22
"os"
23
23
"reflect"
24
+ "runtime"
24
25
"strings"
25
26
"syscall"
26
27
"testing"
@@ -92,11 +93,17 @@ users:
92
93
expectedErr : nil ,
93
94
},
94
95
{
95
- desc : "[failure][disallowEmptyCloudConfig] out of cluster, no kubeconfig, no credential file" ,
96
+ desc : "[linux][ failure][disallowEmptyCloudConfig] out of cluster, no kubeconfig, no credential file" ,
96
97
nodeID : "" ,
97
98
allowEmptyCloudConfig : false ,
98
99
expectedErr : syscall .ENOENT ,
99
100
},
101
+ {
102
+ desc : "[windows][failure][disallowEmptyCloudConfig] out of cluster, no kubeconfig, no credential file" ,
103
+ nodeID : "" ,
104
+ allowEmptyCloudConfig : false ,
105
+ expectedErr : syscall .ENOTDIR ,
106
+ },
100
107
{
101
108
desc : "[success] out of cluster & in cluster, specify a fake kubeconfig, no credential file" ,
102
109
createFakeKubeConfig : true ,
@@ -117,6 +124,12 @@ users:
117
124
118
125
var kubeClient kubernetes.Interface
119
126
for _ , test := range tests {
127
+ if strings .HasPrefix (test .desc , "[linux]" ) && runtime .GOOS == "windows" {
128
+ continue
129
+ }
130
+ if strings .HasPrefix (test .desc , "[windows]" ) && runtime .GOOS == "linux" {
131
+ continue
132
+ }
120
133
if test .createFakeKubeConfig {
121
134
if err := createTestFile (fakeKubeConfig ); err != nil {
122
135
t .Error (err )
0 commit comments