From ec4041bf9d3a486261a96ddc526983d25cd4614f Mon Sep 17 00:00:00 2001 From: Wenqi Qiu Date: Wed, 4 May 2022 00:05:50 +0800 Subject: [PATCH] Fix unit test Signed-off-by: Wenqi Qiu --- pkg/agent/controller/trafficcontrol/controller_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/agent/controller/trafficcontrol/controller_test.go b/pkg/agent/controller/trafficcontrol/controller_test.go index b4a59e56b3d..83376525247 100644 --- a/pkg/agent/controller/trafficcontrol/controller_test.go +++ b/pkg/agent/controller/trafficcontrol/controller_test.go @@ -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 @@ -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"]) }