From 2c74a8ee199cee4175b56d8dde7e65dbb8eb465f Mon Sep 17 00:00:00 2001 From: brandoncate Date: Tue, 5 Apr 2022 13:06:47 -0500 Subject: [PATCH] add assertion to retryOn field Signed-off-by: brandoncate --- pkg/router/contour_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/router/contour_test.go b/pkg/router/contour_test.go index c54f9c524..ef08f9fa2 100644 --- a/pkg/router/contour_test.go +++ b/pkg/router/contour_test.go @@ -18,6 +18,7 @@ package router import ( "context" + contourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1" "testing" "github.com/stretchr/testify/assert" @@ -70,6 +71,7 @@ func TestContourRouter_Reconcile(t *testing.T) { assert.Equal(t, "1m", proxy.Spec.Routes[0].TimeoutPolicy.Response) assert.Equal(t, "/podinfo", proxy.Spec.Routes[0].Conditions[0].Prefix) assert.Equal(t, uint32(10), proxy.Spec.Routes[0].RetryPolicy.NumRetries) + assert.Equal(t, []contourv1.RetryOn{"connect-failure", "gateway-error"}, proxy.Spec.Routes[0].RetryPolicy.RetryOn) // test headers update cd, err = mocks.flaggerClient.FlaggerV1beta1().Canaries("default").Get(context.TODO(), "podinfo", metav1.GetOptions{})