Skip to content

Commit 9606ad9

Browse files
committed
drop go1.13 workaround.
1 parent 6b95b70 commit 9606ad9

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

test/fix_test.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ func TestFix(t *testing.T) {
2626

2727
if os.Getenv("GL_KEEP_TEMP_FILES") == "1" {
2828
t.Logf("Temp dir for fix test: %s", tmpDir)
29-
} else if tCleanupExists {
30-
registerCleanup(t, func() {
29+
} else {
30+
t.Cleanup(func() {
3131
os.RemoveAll(tmpDir)
3232
})
33-
} else {
34-
defer os.RemoveAll(tmpDir)
3533
}
3634

3735
fixDir := filepath.Join(testdataDir, "fix")
@@ -42,10 +40,8 @@ func TestFix(t *testing.T) {
4240
for _, input := range inputs {
4341
input := input
4442
t.Run(filepath.Base(input), func(t *testing.T) {
45-
// if t.Cleanup does not exist, don't run these tests concurrently because we need to use defer for clean up
46-
if tCleanupExists {
47-
t.Parallel()
48-
}
43+
t.Parallel()
44+
4945
args := []string{
5046
"--disable-all", "--print-issued-lines=false", "--print-linter-name=false", "--out-format=line-number",
5147
"--allow-parallel-runners", "--fix",

test/fix_test_go1_13.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/register_cleanup.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)