Fix tests

This commit is contained in:
Łukasz Magiera 2020-07-06 19:19:13 +02:00
parent 7279a80dfa
commit 63c62c49ce
2 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,10 @@ import (
type testStorage stores.StorageConfig
func (t testStorage) DiskUsage(path string) (int64, error) {
return 1, nil // close enough
}
func newTestStorage(t *testing.T) *testStorage {
tp, err := ioutil.TempDir(os.TempDir(), "sector-storage-test-")
require.NoError(t, err)

View File

@ -19,6 +19,10 @@ type TestingLocalStorage struct {
c StorageConfig
}
func (t *TestingLocalStorage) DiskUsage(path string) (int64, error) {
return 1, nil
}
func (t *TestingLocalStorage) GetStorage() (StorageConfig, error) {
return t.c, nil
}