diff --git a/pkg/corerp/renderers/gateway/render_test.go b/pkg/corerp/renderers/gateway/render_test.go index dab84c49f1..2621183de6 100644 --- a/pkg/corerp/renderers/gateway/render_test.go +++ b/pkg/corerp/renderers/gateway/render_test.go @@ -34,6 +34,7 @@ import ( resources_kubernetes "github.com/radius-project/radius/pkg/ucp/resources/kubernetes" "github.com/radius-project/radius/test/testcontext" "github.com/stretchr/testify/require" + "golang.org/x/exp/slices" ) const ( @@ -1473,6 +1474,10 @@ func validateHTTPProxy(t *testing.T, outputResources []rpv1.OutputResource, expe } } + // Sort the dependencies so that tests aren't flaky + slices.Sort(expectedHTTPProxyOutputResource.CreateResource.Dependencies) + slices.Sort(httpProxyOutputResource.CreateResource.Dependencies) + require.Equal(t, expectedHTTPProxyOutputResource, httpProxyOutputResource) require.Equal(t, kubernetes.NormalizeResourceName(resourceName), httpProxy.Name) require.Equal(t, applicationName, httpProxy.Namespace)