Skip to content

Commit

Permalink
perf(test): check tool versions in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
khuedoan committed Oct 3, 2022
1 parent a5a6db1 commit 5071183
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ func TestToolsVersions(t *testing.T) {
}

for _, tool := range tools {
params := version_checker.CheckVersionParams{
BinaryPath: tool.binaryPath,
VersionConstraint: tool.versionConstraint,
WorkingDir: ".",
}
tool := tool // https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
t.Run(tool.binaryPath, func(t *testing.T) {
t.Parallel()
params := version_checker.CheckVersionParams{
BinaryPath: tool.binaryPath,
VersionConstraint: tool.versionConstraint,
WorkingDir: ".",
}

version_checker.CheckVersion(t, params)
version_checker.CheckVersion(t, params)
})
}
}

Expand Down

0 comments on commit 5071183

Please sign in to comment.