Skip to content
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

conformance: fixes for invalid reference policy test #1170

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions conformance/tests/httproute-invalid-reference-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ var HTTPRouteInvalidReferencePolicy = suite.ConformanceTest{
ns := v1alpha2.Namespace(gwNN.Namespace)
gwKind := v1alpha2.Kind("Gateway")

// TODO(mikemorris): Add check for Accepted condition once
// https://github.com/kubernetes-sigs/gateway-api/issues/1112
// has been resolved
t.Run("Route status should have a route parent status with a ResolvedRefs condition with status False and reason RefNotPermitted", func(t *testing.T) {
parents := []v1alpha2.RouteParentStatus{{
ParentRef: v1alpha2.ParentReference{
Expand All @@ -68,12 +65,12 @@ var HTTPRouteInvalidReferencePolicy = suite.ConformanceTest{
kubernetes.HTTPRouteMustHaveParents(t, s.Client, routeNN, parents, false, 60)
})

// TODO(mikemorris): Un-skip check for Listener ResolvedRefs
// TODO(mikemorris): Un-comment check for Listener ResolvedRefs
// RefNotPermitted condition and/or add check for attached
// routes and any expected Listener conditions once
// https://github.com/kubernetes-sigs/gateway-api/issues/1112
// has been resolved
// t.Skip("Gateway listener should have a ResolvedRefs condition with status False and reason RefNotPermitted", func(t *testing.T) {
// t.Run("Gateway listener should have a ResolvedRefs condition with status False and reason RefNotPermitted", func(t *testing.T) {
// listeners := []v1alpha2.ListenerStatus{{
// Name: v1alpha2.SectionName("http"),
// SupportedKinds: []v1alpha2.RouteGroupKind{{
Expand All @@ -90,7 +87,11 @@ var HTTPRouteInvalidReferencePolicy = suite.ConformanceTest{
// kubernetes.GatewayStatusMustHaveListeners(t, s.Client, gwNN, listeners, 60)
// })

gwAddr := kubernetes.GatewayAndHTTPRoutesMustBeReady(t, s.Client, s.ControllerName, gwNN, routeNN)
// TODO(mikemorris): Add routeNN to the end of the arguments below
// to add check for Accepted condition once
// https://github.com/kubernetes-sigs/gateway-api/issues/1112
// has been resolved
gwAddr := kubernetes.GatewayAndHTTPRoutesMustBeReady(t, s.Client, s.ControllerName, gwNN)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped the check for the route to be Accepted here pending the TODO on L49-51 to be resolved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the TODO from L49 down to here? I actually hadn't looked at the impl of GatewayAndHTTPRoutesMustBeReady, didn't realize it was actually checking the Accepted condition on routes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 moved and reworded slightly


// TODO(mikemorris): Add check for HTTP requests successfully reaching
// app-backend-v1 at path "/" if it is determined that a Route with at
Expand Down
3 changes: 2 additions & 1 deletion conformance/tests/httproute-invalid-reference-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ spec:
rules:
- matches:
- path:
value: "/v2"
type: PathPrefix
value: "/v2"
backendRefs:
- name: app-backend-v2
namespace: gateway-conformance-app-backend
Expand Down