Skip to content

Commit b3419e0

Browse files
committed
service controller: remove duplicate unit test TestGetNodePredicate (Test_getNodeConditionPredicate already exists)
Signed-off-by: Andrew Sy Kim <[email protected]>
1 parent 55292cf commit b3419e0

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

pkg/controller/service/controller_test.go

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -475,50 +475,6 @@ func TestUpdateNodesInExternalLoadBalancer(t *testing.T) {
475475
}
476476
}
477477

478-
func TestGetNodeConditionPredicate(t *testing.T) {
479-
tests := []struct {
480-
node v1.Node
481-
expectAccept bool
482-
name string
483-
}{
484-
{
485-
node: v1.Node{},
486-
expectAccept: false,
487-
name: "empty",
488-
},
489-
{
490-
node: v1.Node{
491-
Status: v1.NodeStatus{
492-
Conditions: []v1.NodeCondition{
493-
{Type: v1.NodeReady, Status: v1.ConditionTrue},
494-
},
495-
},
496-
},
497-
expectAccept: true,
498-
name: "basic",
499-
},
500-
{
501-
node: v1.Node{
502-
Spec: v1.NodeSpec{Unschedulable: true},
503-
Status: v1.NodeStatus{
504-
Conditions: []v1.NodeCondition{
505-
{Type: v1.NodeReady, Status: v1.ConditionTrue},
506-
},
507-
},
508-
},
509-
expectAccept: false,
510-
name: "unschedulable",
511-
},
512-
}
513-
pred := getNodeConditionPredicate()
514-
for _, test := range tests {
515-
accept := pred(&test.node)
516-
if accept != test.expectAccept {
517-
t.Errorf("Test failed for %s, expected %v, saw %v", test.name, test.expectAccept, accept)
518-
}
519-
}
520-
}
521-
522478
func TestProcessServiceCreateOrUpdate(t *testing.T) {
523479
controller, _, client := newController()
524480

0 commit comments

Comments
 (0)