Skip to content

Commit

Permalink
test: Allow fix tests to run concurrently (#1576)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashanbrown committed Feb 20, 2021
1 parent f00da2c commit eace6a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/fix_test.go
Expand Up @@ -27,7 +27,9 @@ func TestFix(t *testing.T) {
if os.Getenv("GL_KEEP_TEMP_FILES") == "1" {
t.Logf("Temp dir for fix test: %s", tmpDir)
} else {
defer os.RemoveAll(tmpDir)
t.Cleanup(func() {
os.RemoveAll(tmpDir)
})
}

fixDir := filepath.Join(testdataDir, "fix")
Expand All @@ -38,9 +40,11 @@ func TestFix(t *testing.T) {
for _, input := range inputs {
input := input
t.Run(filepath.Base(input), func(t *testing.T) {
t.Parallel()

args := []string{
"--disable-all", "--print-issued-lines=false", "--print-linter-name=false", "--out-format=line-number",
"--fix",
"--allow-parallel-runners", "--fix",
input,
}
rc := extractRunContextFromComments(t, input)
Expand Down

0 comments on commit eace6a1

Please sign in to comment.