From 3792ed1c0238f6c96a2cc4ab197064813f83b15e Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Tue, 13 Aug 2024 15:40:24 -0600 Subject: [PATCH] Capture range variable in subtests --- internal/mode/static/state/graph/reference_grant_test.go | 2 ++ internal/mode/static/state/graph/tlsroute_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/mode/static/state/graph/reference_grant_test.go b/internal/mode/static/state/graph/reference_grant_test.go index 41d2615ec..c8ac49f82 100644 --- a/internal/mode/static/state/graph/reference_grant_test.go +++ b/internal/mode/static/state/graph/reference_grant_test.go @@ -162,6 +162,7 @@ func TestReferenceGrantResolver(t *testing.T) { resolver := newReferenceGrantResolver(refGrants) for _, test := range tests { + test := test t.Run(test.msg, func(t *testing.T) { t.Parallel() @@ -414,6 +415,7 @@ func TestRefAllowedFrom(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { t.Parallel() diff --git a/internal/mode/static/state/graph/tlsroute_test.go b/internal/mode/static/state/graph/tlsroute_test.go index edd6536ac..d67d638bf 100644 --- a/internal/mode/static/state/graph/tlsroute_test.go +++ b/internal/mode/static/state/graph/tlsroute_test.go @@ -551,6 +551,7 @@ func TestBuildTLSRoute(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { g := NewWithT(t) t.Parallel()