-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(trafficrouting): patch VirtualService when there is only one named route #4055
base: master
Are you sure you want to change the base?
Conversation
…d route Signed-off-by: Jean Morais <[email protected]>
52ea5ab
to
02d680f
Compare
Published E2E Test Results 4 files 4 suites 3h 11m 51s ⏱️ For more details on these failures, see this check. Results for commit 1fb273b. ♻️ This comment has been updated with latest results. |
Published Unit Test Results2 296 tests 2 296 ✅ 2m 59s ⏱️ Results for commit 1fb273b. ♻️ This comment has been updated with latest results. |
// Test case when the rollout has no managed routes defined | ||
httpRoutes := []VirtualServiceHTTPRoute{ | ||
{Name: "foo", Match: nil}, | ||
{Name: "", Match: nil}, | ||
} | ||
|
||
indexes, err := getHttpRouteIndexesToPatch([]string{}, httpRoutes) | ||
assert.NoError(t, err) | ||
assert.Equal(t, []int{1}, indexes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you wrap each test inside a Run block. For instance,
t.Run("the rollout has no managed routes defined, func(t *testing.T) {
httpRoutes := []VirtualServiceHTTPRoute{
{Name: "foo", Match: nil},
{Name: "", Match: nil},
}
indexes, err := getHttpRouteIndexesToPatch([]string{}, httpRoutes)
assert.NoError(t, err)
assert.Equal(t, []int{1}, indexes)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agaudreault done.
Signed-off-by: Jean Morais <[email protected]>
27b3e03
to
1fb273b
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Fixes #3884
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.