mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/khuedoan/homelab.git
synced 2026-09-20 08:03:58 +08:00
perf(test): check tool versions in parallel
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user