@@ -852,7 +852,8 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour
852
852
},
853
853
}
854
854
855
- for _ , testCase := range testCases {
855
+ for i := range testCases {
856
+ testCase := testCases [i ]
856
857
t .Run (testCase .name , func (t * testing.T ) {
857
858
require .NoError (t , cli .Create (ctx , & testCase .route ))
858
859
defer func () {
@@ -879,7 +880,7 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour
879
880
880
881
res := resources .GetResourcesByGatewayClass (gc .Name )
881
882
require .NotNil (t , res )
882
- require .Equal (t , & testCase . route , res . HTTPRoutes [ 0 ] )
883
+ require .Contains (t , res . HTTPRoutes , & testCase . route )
883
884
884
885
// Ensure the HTTPRoute Namespace is in the Namespace resource map.
885
886
require .Eventually (t , func () bool {
@@ -1001,7 +1002,8 @@ func testTLSRoute(ctx context.Context, t *testing.T, provider *Provider, resourc
1001
1002
},
1002
1003
}
1003
1004
1004
- for _ , testCase := range testCases {
1005
+ for i := range testCases {
1006
+ testCase := testCases [i ]
1005
1007
t .Run (testCase .name , func (t * testing.T ) {
1006
1008
require .NoError (t , cli .Create (ctx , & testCase .route ))
1007
1009
defer func () {
@@ -1028,7 +1030,7 @@ func testTLSRoute(ctx context.Context, t *testing.T, provider *Provider, resourc
1028
1030
1029
1031
res := resources .GetResourcesByGatewayClass (gc .Name )
1030
1032
require .NotNil (t , res )
1031
- require .Equal (t , & testCase . route , res . TLSRoutes [ 0 ] )
1033
+ require .Contains (t , res . TLSRoutes , & testCase . route )
1032
1034
1033
1035
// Ensure the HTTPRoute Namespace is in the Namespace resource map.
1034
1036
require .Eventually (t , func () bool {
0 commit comments