@@ -18,7 +18,6 @@ package validation
18
18
19
19
import (
20
20
"context"
21
- "errors"
22
21
"fmt"
23
22
"os"
24
23
"path/filepath"
@@ -1248,80 +1247,6 @@ func TestValidateUniqueDependencyAliases(t *testing.T) {
1248
1247
testutil .CheckDeepEqual (t , expected , errs , cmp .Comparer (errorsComparer ))
1249
1248
}
1250
1249
1251
- func TestValidateSingleKubeContext (t * testing.T ) {
1252
- tests := []struct {
1253
- description string
1254
- configs []* latestV1.SkaffoldConfig
1255
- err []error
1256
- }{
1257
- {
1258
- description : "different kubeContext specified" ,
1259
- configs : []* latestV1.SkaffoldConfig {
1260
- {
1261
- Pipeline : latestV1.Pipeline {
1262
- Deploy : latestV1.DeployConfig {
1263
- KubeContext : "" ,
1264
- },
1265
- },
1266
- },
1267
- {
1268
- Pipeline : latestV1.Pipeline {
1269
- Deploy : latestV1.DeployConfig {
1270
- KubeContext : "foo" ,
1271
- },
1272
- },
1273
- },
1274
- },
1275
- err : []error {errors .New ("all configs should have the same value for `deploy.kubeContext`" )},
1276
- },
1277
- {
1278
- description : "same kubeContext specified" ,
1279
- configs : []* latestV1.SkaffoldConfig {
1280
- {
1281
- Pipeline : latestV1.Pipeline {
1282
- Deploy : latestV1.DeployConfig {
1283
- KubeContext : "foo" ,
1284
- },
1285
- },
1286
- },
1287
- {
1288
- Pipeline : latestV1.Pipeline {
1289
- Deploy : latestV1.DeployConfig {
1290
- KubeContext : "foo" ,
1291
- },
1292
- },
1293
- },
1294
- },
1295
- },
1296
- {
1297
- description : "no kubeContext specified" ,
1298
- configs : []* latestV1.SkaffoldConfig {
1299
- {
1300
- Pipeline : latestV1.Pipeline {
1301
- Deploy : latestV1.DeployConfig {},
1302
- },
1303
- },
1304
- {
1305
- Pipeline : latestV1.Pipeline {
1306
- Deploy : latestV1.DeployConfig {},
1307
- },
1308
- },
1309
- },
1310
- },
1311
- }
1312
-
1313
- for _ , test := range tests {
1314
- testutil .Run (t , test .description , func (t * testutil.T ) {
1315
- set := parser.SkaffoldConfigSet {}
1316
- for _ , c := range test .configs {
1317
- set = append (set , & parser.SkaffoldConfigEntry {SkaffoldConfig : c })
1318
- }
1319
- errs := validateSingleKubeContext (set )
1320
- t .CheckDeepEqual (test .err , errs , cmp .Comparer (errorsComparer ))
1321
- })
1322
- }
1323
- }
1324
-
1325
1250
func TestValidateValidDependencyAliases (t * testing.T ) {
1326
1251
cfgs := parser.SkaffoldConfigSet {
1327
1252
& parser.SkaffoldConfigEntry {
0 commit comments