diff --git a/store/kv/keyloader_test.go b/store/kv/keyloader_test.go index 4e4314f..ac9ad99 100644 --- a/store/kv/keyloader_test.go +++ b/store/kv/keyloader_test.go @@ -9,13 +9,14 @@ import ( "testing" ) -const keyloaderTestDir = "key-loader" +const keyTestDir = "key-loader" +const keyTestFile = "test.keys" func TestNewKeysLoader(t *testing.T) { - keyDir, err := os.MkdirTemp(os.TempDir(), keyloaderTestDir) + keyDir, err := os.MkdirTemp(os.TempDir(), keyTestDir) require.NoError(t, err) - keyPath := filepath.Join(keyDir, "test.keys") + keyPath := filepath.Join(keyDir, keyTestFile) defer os.RemoveAll(keyPath) loader := NewKeysLoader(keyPath) @@ -23,10 +24,10 @@ func TestNewKeysLoader(t *testing.T) { } func Test_fileLoader_Save(t *testing.T) { - keyDir, err := os.MkdirTemp(os.TempDir(), keyloaderTestDir) + keyDir, err := os.MkdirTemp(os.TempDir(), keyTestDir) require.NoError(t, err) - keyPath := filepath.Join(keyDir, "test.keys") + keyPath := filepath.Join(keyDir, keyTestFile) defer os.RemoveAll(keyPath) loader := NewKeysLoader(keyPath) @@ -45,10 +46,10 @@ func Test_fileLoader_Save(t *testing.T) { } func Test_fileLoader_Load(t *testing.T) { - keyDir, err := os.MkdirTemp(os.TempDir(), keyloaderTestDir) + keyDir, err := os.MkdirTemp(os.TempDir(), keyTestDir) require.NoError(t, err) - keyPath := filepath.Join(keyDir, "test.keys") + keyPath := filepath.Join(keyDir, keyTestFile) defer os.RemoveAll(keyPath) loader := NewKeysLoader(keyPath)