-
Notifications
You must be signed in to change notification settings - Fork 572
Description
What would you like to be added:
We currently have some duplicative methods that really should be unified before we add conformance tests for more types. For example, the following functions have significant overlap:
-
GatewayAndHTTPRoutesMustBeAccepted + GatewayAndTLSRoutesMustBeAccepted
func GatewayAndHTTPRoutesMustBeAccepted(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, controllerName string, gw GatewayRef, routeNNs ...types.NamespacedName) string {
func GatewayAndTLSRoutesMustBeAccepted(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, controllerName string, gw GatewayRef, routeNNs ...types.NamespacedName) (string, []v1beta1.Hostname) { -
HTTPRouteMustHaveParents + TLSRouteMustHaveParents
func HTTPRouteMustHaveParents(t *testing.T, client client.Client, timeoutConfig config.TimeoutConfig, routeName types.NamespacedName, parents []v1beta1.RouteParentStatus, namespaceRequired bool) {
func TLSRouteMustHaveParents(t *testing.T, client client.Client, timeoutConfig config.TimeoutConfig, routeName types.NamespacedName, parents []v1alpha2.RouteParentStatus, namespaceRequired bool) v1alpha2.TLSRoute {
Why this is needed:
Our conformance tests have grown organically over the years. Although each change made sense in isolation, these changes have resulted in a high likelihood that we'll start to have unexpected variations between tests for different route types.
Note: This is going to be complex to resolve, it would likely be good for someone that already has experience writing and/or running conformance tests to work on this. It may also be good to agree on a direction in this issue before investing too much time in writing code for this.