Skip to content

Commit

Permalink
add assertion to retryOn field
Browse files Browse the repository at this point in the history
Signed-off-by: brandoncate <brandon.cate@shipt.com>
  • Loading branch information
BrandonCate committed Apr 5, 2022
1 parent 705b4ab commit 2c74a8e
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 2c74a8e

Please sign in to comment.