@@ -507,7 +507,7 @@ func TestPreFilterPlugin(t *testing.T) {
507
507
preFilterPlugin .rejectPreFilter = test .reject
508
508
// Create a best effort pod.
509
509
pod , err := createPausePod (testCtx .ClientSet ,
510
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
510
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
511
511
if err != nil {
512
512
t .Errorf ("Error while creating a test pod: %v" , err )
513
513
}
@@ -559,7 +559,7 @@ func TestScorePlugin(t *testing.T) {
559
559
scorePlugin .failScore = fail
560
560
// Create a best effort pod.
561
561
pod , err := createPausePod (testCtx .ClientSet ,
562
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
562
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
563
563
if err != nil {
564
564
t .Fatalf ("Error while creating a test pod: %v" , err )
565
565
}
@@ -617,7 +617,7 @@ func TestNormalizeScorePlugin(t *testing.T) {
617
617
618
618
// Create a best effort pod.
619
619
pod , err := createPausePod (testCtx .ClientSet ,
620
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
620
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
621
621
if err != nil {
622
622
t .Fatalf ("Error while creating a test pod: %v" , err )
623
623
}
@@ -666,7 +666,7 @@ func TestReservePlugin(t *testing.T) {
666
666
reservePlugin .failReserve = fail
667
667
// Create a best effort pod.
668
668
pod , err := createPausePod (testCtx .ClientSet ,
669
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
669
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
670
670
if err != nil {
671
671
t .Errorf ("Error while creating a test pod: %v" , err )
672
672
}
@@ -744,7 +744,7 @@ func TestPrebindPlugin(t *testing.T) {
744
744
preBindPlugin .rejectPreBind = test .reject
745
745
// Create a best effort pod.
746
746
pod , err := createPausePod (testCtx .ClientSet ,
747
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
747
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
748
748
if err != nil {
749
749
t .Errorf ("Error while creating a test pod: %v" , err )
750
750
}
@@ -819,7 +819,7 @@ func TestUnreservePlugin(t *testing.T) {
819
819
820
820
// Create a best effort pod.
821
821
pod , err := createPausePod (testCtx .ClientSet ,
822
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
822
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
823
823
if err != nil {
824
824
t .Errorf ("Error while creating a test pod: %v" , err )
825
825
}
@@ -953,7 +953,7 @@ func TestBindPlugin(t *testing.T) {
953
953
954
954
// Create a best effort pod.
955
955
pod , err := createPausePod (testCtx .ClientSet ,
956
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
956
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
957
957
if err != nil {
958
958
t .Errorf ("Error while creating a test pod: %v" , err )
959
959
}
@@ -1080,7 +1080,7 @@ func TestPostBindPlugin(t *testing.T) {
1080
1080
1081
1081
// Create a best effort pod.
1082
1082
pod , err := createPausePod (testCtx .ClientSet ,
1083
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1083
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1084
1084
if err != nil {
1085
1085
t .Errorf ("Error while creating a test pod: %v" , err )
1086
1086
}
@@ -1165,7 +1165,7 @@ func TestPermitPlugin(t *testing.T) {
1165
1165
1166
1166
// Create a best effort pod.
1167
1167
pod , err := createPausePod (testCtx .ClientSet ,
1168
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1168
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1169
1169
if err != nil {
1170
1170
t .Errorf ("Error while creating a test pod: %v" , err )
1171
1171
}
@@ -1214,7 +1214,7 @@ func TestMultiplePermitPlugins(t *testing.T) {
1214
1214
// Create a test pod.
1215
1215
podName := "test-pod"
1216
1216
pod , err := createPausePod (testCtx .ClientSet ,
1217
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : podName , Namespace : testCtx .NS .Name }))
1217
+ initPausePod (& pausePodConfig {Name : podName , Namespace : testCtx .NS .Name }))
1218
1218
if err != nil {
1219
1219
t .Errorf ("Error while creating a test pod: %v" , err )
1220
1220
}
@@ -1269,7 +1269,7 @@ func TestPermitPluginsCancelled(t *testing.T) {
1269
1269
// Create a test pod.
1270
1270
podName := "test-pod"
1271
1271
pod , err := createPausePod (testCtx .ClientSet ,
1272
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : podName , Namespace : testCtx .NS .Name }))
1272
+ initPausePod (& pausePodConfig {Name : podName , Namespace : testCtx .NS .Name }))
1273
1273
if err != nil {
1274
1274
t .Errorf ("Error while creating a test pod: %v" , err )
1275
1275
}
@@ -1328,12 +1328,12 @@ func TestCoSchedulingWithPermitPlugin(t *testing.T) {
1328
1328
// Create two pods. First pod to enter Permit() will wait and a second one will either
1329
1329
// reject or allow first one.
1330
1330
podA , err := createPausePod (testCtx .ClientSet ,
1331
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "pod-a" , Namespace : testCtx .NS .Name }))
1331
+ initPausePod (& pausePodConfig {Name : "pod-a" , Namespace : testCtx .NS .Name }))
1332
1332
if err != nil {
1333
1333
t .Errorf ("Error while creating the first pod: %v" , err )
1334
1334
}
1335
1335
podB , err := createPausePod (testCtx .ClientSet ,
1336
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "pod-b" , Namespace : testCtx .NS .Name }))
1336
+ initPausePod (& pausePodConfig {Name : "pod-b" , Namespace : testCtx .NS .Name }))
1337
1337
if err != nil {
1338
1338
t .Errorf ("Error while creating the second pod: %v" , err )
1339
1339
}
@@ -1403,7 +1403,7 @@ func TestFilterPlugin(t *testing.T) {
1403
1403
filterPlugin .failFilter = fail
1404
1404
// Create a best effort pod.
1405
1405
pod , err := createPausePod (testCtx .ClientSet ,
1406
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1406
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1407
1407
if err != nil {
1408
1408
t .Errorf ("Error while creating a test pod: %v" , err )
1409
1409
}
@@ -1457,7 +1457,7 @@ func TestPreScorePlugin(t *testing.T) {
1457
1457
preScorePlugin .failPreScore = fail
1458
1458
// Create a best effort pod.
1459
1459
pod , err := createPausePod (testCtx .ClientSet ,
1460
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1460
+ initPausePod (& pausePodConfig {Name : "test-pod" , Namespace : testCtx .NS .Name }))
1461
1461
if err != nil {
1462
1462
t .Errorf ("Error while creating a test pod: %v" , err )
1463
1463
}
@@ -1517,7 +1517,7 @@ func TestPreemptWithPermitPlugin(t *testing.T) {
1517
1517
}
1518
1518
1519
1519
// First pod will go waiting.
1520
- waitingPod := initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "waiting-pod" , Namespace : testCtx .NS .Name , Priority : & lowPriority , Resources : & resourceRequest })
1520
+ waitingPod := initPausePod (& pausePodConfig {Name : "waiting-pod" , Namespace : testCtx .NS .Name , Priority : & lowPriority , Resources : & resourceRequest })
1521
1521
waitingPod .Spec .TerminationGracePeriodSeconds = new (int64 )
1522
1522
waitingPod , err = createPausePod (testCtx .ClientSet , waitingPod )
1523
1523
if err != nil {
@@ -1532,7 +1532,7 @@ func TestPreemptWithPermitPlugin(t *testing.T) {
1532
1532
1533
1533
// Create second pod which should preempt first pod.
1534
1534
preemptorPod , err := createPausePod (testCtx .ClientSet ,
1535
- initPausePod (testCtx . ClientSet , & pausePodConfig {Name : "preemptor-pod" , Namespace : testCtx .NS .Name , Priority : & highPriority , Resources : & resourceRequest }))
1535
+ initPausePod (& pausePodConfig {Name : "preemptor-pod" , Namespace : testCtx .NS .Name , Priority : & highPriority , Resources : & resourceRequest }))
1536
1536
if err != nil {
1537
1537
t .Errorf ("Error while creating the preemptor pod: %v" , err )
1538
1538
}
0 commit comments