Skip to content

Commit

Permalink
add assertion to retryOn field
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonCate committed Apr 5, 2022
1 parent bf7c863 commit 095c4cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/router/contour_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package router

import (
"context"
contourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -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{})
Expand Down

0 comments on commit 095c4cd

Please sign in to comment.