diff --git a/shared/keystore/BUILD.bazel b/shared/keystore/BUILD.bazel index e933947f8..d669ee981 100644 --- a/shared/keystore/BUILD.bazel +++ b/shared/keystore/BUILD.bazel @@ -28,6 +28,7 @@ go_test( embed = [":go_default_library"], deps = [ "//shared/bls:go_default_library", + "//shared/testutil:go_default_library", "@com_github_pborman_uuid//:go_default_library", ], ) diff --git a/shared/keystore/key_test.go b/shared/keystore/key_test.go index 23e366372..ec8751c20 100644 --- a/shared/keystore/key_test.go +++ b/shared/keystore/key_test.go @@ -10,6 +10,7 @@ import ( "github.com/pborman/uuid" "github.com/prysmaticlabs/prysm/shared/bls" + "github.com/prysmaticlabs/prysm/shared/testutil" ) func TestMarshalAndUnmarshal(t *testing.T) { @@ -43,7 +44,7 @@ func TestMarshalAndUnmarshal(t *testing.T) { } func TestStoreRandomKey(t *testing.T) { - tmpdir := os.TempDir() + tmpdir := testutil.TempDir() filedir := tmpdir + "/keystore" ks := &Store{ keysDirPath: filedir, diff --git a/shared/keystore/keystore_test.go b/shared/keystore/keystore_test.go index 88d0a8e31..23119be38 100644 --- a/shared/keystore/keystore_test.go +++ b/shared/keystore/keystore_test.go @@ -9,10 +9,11 @@ import ( "github.com/pborman/uuid" "github.com/prysmaticlabs/prysm/shared/bls" + "github.com/prysmaticlabs/prysm/shared/testutil" ) func TestStoreandGetKey(t *testing.T) { - tmpdir := os.TempDir() + tmpdir := testutil.TempDir() filedir := tmpdir + "/keystore" ks := &Store{ keysDirPath: filedir,