Skip to content

Commit

Permalink
update test pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Perdue committed Dec 8, 2022
1 parent 4eb6b52 commit 926b320
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ingress/ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func TestSyncIngressNotReferencedByRolloutMultiIngress(t *testing.T) {

ctrl, kubeclient, _ := newFakeIngressControllerMultiIngress(t, ings, nil)

err := ctrl.syncIngress("default/test-stable-ingress")
err := ctrl.syncIngress(context.Background(), "default/test-stable-ingress")
assert.NoError(t, err)
actions := kubeclient.Actions()
assert.Len(t, actions, 0)
Expand Down Expand Up @@ -260,7 +260,7 @@ func TestSyncIngressReferencedByRolloutMultiIngress(t *testing.T) {

ctrl, kubeclient, enqueuedObjects := newFakeIngressControllerMultiIngress(t, ings, rollout)

err := ctrl.syncIngress("default/test-stable-ingress")
err := ctrl.syncIngress(context.Background(), "default/test-stable-ingress")
assert.NoError(t, err)
actions := kubeclient.Actions()
assert.Len(t, actions, 0)
Expand Down Expand Up @@ -299,11 +299,12 @@ func TestSkipIngressWithNoClass(t *testing.T) {
assert.Len(t, enqueuedObjects, 0)
}

func TestSkipIngressWithNoAnnotationsMultiIngress(t *testing.T) {
func TestSkipIngressWithNoClassMultiIngress(t *testing.T) {
ings := []*extensionsv1beta1.Ingress{
newNginxIngress("test-stable-ingress", 80, "stable-service"),
newNginxIngress("test-stable-ingress-additional", 80, "stable-service"),
newNginxIngressWithAnnotation("test-stable-ingress", 80, "stable-service"),
newNginxIngressWithAnnotation("test-stable-ingress-additional", 80, "canary-service"),
}

for _, i := range ings {
i.Annotations = nil
}
Expand Down Expand Up @@ -331,7 +332,7 @@ func TestSkipIngressWithNoAnnotationsMultiIngress(t *testing.T) {

ctrl, kubeclient, enqueuedObjects := newFakeIngressControllerMultiIngress(t, ings, rollout)

err := ctrl.syncIngress("default/test-stable-ingress")
err := ctrl.syncIngress(context.Background(), "default/test-stable-ingress")
assert.NoError(t, err)
actions := kubeclient.Actions()
assert.Len(t, actions, 0)
Expand Down

0 comments on commit 926b320

Please sign in to comment.