Skip to content

Commit d86fc39

Browse files
committed
removed irrelevant unit test.
after adding predicate to the controller registration, the reconcile function no longer contains the filtering logic. therefore, it's not relecant to test the reconcile function with pool2. in runtime, this event will be filtered out much earlier Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent fc9f838 commit d86fc39

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

pkg/epp/controller/inferencepool_reconciler_test.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,7 @@ func TestReconcile_InferencePoolReconciler(t *testing.T) {
102102
t.Errorf("Unexpected diff (+got/-want): %s", diff)
103103
}
104104

105-
// Step 2: A reconcile on pool2 should not change anything.
106-
if _, err := inferencePoolReconciler.Reconcile(ctx, ctrl.Request{NamespacedName: types.NamespacedName{Name: pool2.Name, Namespace: pool2.Namespace}}); err != nil {
107-
t.Errorf("Unexpected InferencePool reconcile error: %v", err)
108-
}
109-
if diff := diffPool(datastore, pool1, []string{"pod1", "pod2"}); diff != "" {
110-
t.Errorf("Unexpected diff (+got/-want): %s", diff)
111-
}
112-
113-
// Step 3: update the pool selector to include more pods
105+
// Step 2: update the pool selector to include more pods
114106
newPool1 := &v1alpha2.InferencePool{}
115107
if err := fakeClient.Get(ctx, req.NamespacedName, newPool1); err != nil {
116108
t.Errorf("Unexpected pool get error: %v", err)
@@ -127,7 +119,7 @@ func TestReconcile_InferencePoolReconciler(t *testing.T) {
127119
t.Errorf("Unexpected diff (+got/-want): %s", diff)
128120
}
129121

130-
// Step 4: update the pool port
122+
// Step 3: update the pool port
131123
if err := fakeClient.Get(ctx, req.NamespacedName, newPool1); err != nil {
132124
t.Errorf("Unexpected pool get error: %v", err)
133125
}
@@ -142,7 +134,7 @@ func TestReconcile_InferencePoolReconciler(t *testing.T) {
142134
t.Errorf("Unexpected diff (+got/-want): %s", diff)
143135
}
144136

145-
// Step 5: delete the pool to trigger a datastore clear
137+
// Step 4: delete the pool to trigger a datastore clear
146138
if err := fakeClient.Get(ctx, req.NamespacedName, newPool1); err != nil {
147139
t.Errorf("Unexpected pool get error: %v", err)
148140
}

0 commit comments

Comments
 (0)