Skip to content

[test] Fix loop closures #17109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func TestAdditionalRepositories(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.Name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 2 additions & 0 deletions test/tests/components/ws-manager/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func TestBackup(t *testing.T) {
*/
}
for _, test := range tests {
test := test
t.Run(test.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -406,6 +407,7 @@ func TestMissingBackup(t *testing.T) {
// {Name: "pvc", FF: []wsmanapi.WorkspaceFeatureFlag{wsmanapi.WorkspaceFeatureFlag_PERSISTENT_VOLUME_CLAIM}},
}
for _, test := range tests {
test := test
t.Run(test.Name+"_backup_init", func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 2 additions & 0 deletions test/tests/components/ws-manager/prebuild_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestPrebuildWorkspaceTaskSuccess(t *testing.T) {
*/
}
for _, test := range tests {
test := test
t.Run(test.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -540,6 +541,7 @@ func TestOpenWorkspaceFromOutdatedPrebuild(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.Name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 1 addition & 0 deletions test/tests/components/ws-manager/tasks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func TestRegularWorkspaceTasks(t *testing.T) {
WithLabel("type", "tasks").
Assess("it can run workspace tasks", func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
for _, test := range tests {
test := test
t.Run(test.Name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 1 addition & 0 deletions test/tests/workspace/contexts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func runContextTests(t *testing.T, tests []ContextTest) {

for _, ff := range ffs {
for _, test := range tests {
test := test
t.Run(test.ContextURL+"_"+ff.Name, func(t *testing.T) {
report.SetupReport(t, report.FeatureContentInit, fmt.Sprintf("Test to open %v", test.ContextURL))
if test.Skip {
Expand Down
1 change: 1 addition & 0 deletions test/tests/workspace/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestWorkspaceInstrumentation(t *testing.T) {
WithLabel("component", "server").
Assess("it can instrument a workspace", func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
for _, test := range tests {
test := test
t.Run(test.ContextURL, func(t *testing.T) {
report.SetupReport(t, report.FeatureExample, "this is the example test for instrumenting a workspace")

Expand Down
1 change: 1 addition & 0 deletions test/tests/workspace/git_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func TestGitHooks(t *testing.T) {

for _, ff := range ffs {
for _, test := range tests {
test := test
t.Run(test.ContextURL+"_"+ff.Name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 1 addition & 0 deletions test/tests/workspace/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func TestGitActions(t *testing.T) {

for _, ff := range ffs {
for _, test := range tests {
test := test
t.Run(test.ContextURL+"_"+ff.Name, func(t *testing.T) {
t.Parallel()
if test.Skip {
Expand Down