chore: remove unnecessary redeclarations in for loops (#18440)

This commit is contained in:
ケイラ
2025-06-20 13:16:55 -06:00
committed by GitHub
parent 4fe0a4bca2
commit fae30a00fd
200 changed files with 0 additions and 431 deletions
-4
View File
@@ -500,8 +500,6 @@ func Run(t *testing.T, appHostIsPrimary bool, factory DeploymentFactory) {
}
for _, c := range cases {
c := c
if c.name == "Path" && appHostIsPrimary {
// Workspace application auth does not apply to path apps
// served from the primary access URL as no smuggling needs
@@ -1686,8 +1684,6 @@ func Run(t *testing.T, appHostIsPrimary bool, factory DeploymentFactory) {
}
for _, c := range cases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()
@@ -56,7 +56,6 @@ func TestApplicationURLString(t *testing.T) {
}
for _, c := range testCases {
c := c
t.Run(c.Name, func(t *testing.T) {
t.Parallel()
@@ -158,7 +157,6 @@ func TestParseSubdomainAppURL(t *testing.T) {
}
for _, c := range testCases {
c := c
t.Run(c.Name, func(t *testing.T) {
t.Parallel()
@@ -378,7 +376,6 @@ func TestCompileHostnamePattern(t *testing.T) {
}
for _, c := range testCases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()
@@ -390,7 +387,6 @@ func TestCompileHostnamePattern(t *testing.T) {
require.Equal(t, expected, regex.String(), "generated regex does not match")
for i, m := range c.matchCases {
m := m
t.Run(fmt.Sprintf("MatchCase%d", i), func(t *testing.T) {
t.Parallel()
@@ -459,7 +455,6 @@ func TestConvertAppURLForCSP(t *testing.T) {
}
for _, c := range testCases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()
require.Equal(t, c.expected, appurl.ConvertAppHostForCSP(c.host, c.wildcard))
-2
View File
@@ -270,8 +270,6 @@ func Test_ResolveRequest(t *testing.T) {
}
for _, c := range cases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()
-1
View File
@@ -272,7 +272,6 @@ func Test_RequestValidate(t *testing.T) {
}
for _, c := range cases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()
req := c.req
-1
View File
@@ -280,7 +280,6 @@ func TestStatsCollector(t *testing.T) {
// Run tests.
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
-2
View File
@@ -273,8 +273,6 @@ func Test_TokenMatchesRequest(t *testing.T) {
}
for _, c := range cases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()