mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
281e5d1cfd
* provide validator with real keystore public key * fmt * build errors buildkite * readd imports removed by goimport * gazelle * address broken tests * make reference to filename a param * fmt * imports * gazelle * os remove all * Use better Temp storage for tests * testmain approach to avoid repeating expensive operation for each test * travis lint * fix test * nokeystore in status test * passing * fix goimports
15 lines
274 B
Go
15 lines
274 B
Go
package testutil
|
|
|
|
import "os"
|
|
|
|
// TempDir returns a directory path for temporary test storage.
|
|
func TempDir() string {
|
|
d := os.Getenv("TEST_TMPDIR")
|
|
|
|
// If the test is not run via bazel, the environment var won't be set.
|
|
if d == "" {
|
|
return os.TempDir()
|
|
}
|
|
return d
|
|
}
|