Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed May 3, 2022
1 parent 2bc548a commit ec4041b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/agent/controller/trafficcontrol/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ func TestTrafficControlControllerPodUpdate(t *testing.T) {
_, err = c.client.CoreV1().Pods("ns1").Create(defaultContext, pod1, metav1.CreateOptions{})
require.NoError(t, err)

c.mockOFClient.EXPECT().InstallTrafficControlMarkFlows("trafficControl1", []uint32{1}, uint32(3), v1alpha2.DirectionIngress, v1alpha2.ActionMirror)
c.mockOFClient.EXPECT().InstallTrafficControlMarkFlows("tc-mirror", []uint32{1}, uint32(3), v1alpha2.DirectionIngress, v1alpha2.ActionMirror)

assert.NoError(t, wait.Poll(100*time.Millisecond, time.Second, func() (done bool, err error) {
return c.Controller.tcStates != nil, nil
Expand All @@ -449,5 +449,5 @@ func TestTrafficControlControllerPodUpdate(t *testing.T) {
targetPort: uint32(3),
returnPort: 0,
appliedTo: tc.Spec.AppliedTo,
}, c.Controller.tcStates["trafficControl1"])
}, c.Controller.tcStates["tc-mirror"])
}

0 comments on commit ec4041b

Please sign in to comment.