Fix tests
This commit is contained in:
parent
7279a80dfa
commit
63c62c49ce
@ -24,6 +24,10 @@ import (
|
|||||||
|
|
||||||
type testStorage stores.StorageConfig
|
type testStorage stores.StorageConfig
|
||||||
|
|
||||||
|
func (t testStorage) DiskUsage(path string) (int64, error) {
|
||||||
|
return 1, nil // close enough
|
||||||
|
}
|
||||||
|
|
||||||
func newTestStorage(t *testing.T) *testStorage {
|
func newTestStorage(t *testing.T) *testStorage {
|
||||||
tp, err := ioutil.TempDir(os.TempDir(), "sector-storage-test-")
|
tp, err := ioutil.TempDir(os.TempDir(), "sector-storage-test-")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
@ -19,6 +19,10 @@ type TestingLocalStorage struct {
|
|||||||
c StorageConfig
|
c StorageConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *TestingLocalStorage) DiskUsage(path string) (int64, error) {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (t *TestingLocalStorage) GetStorage() (StorageConfig, error) {
|
func (t *TestingLocalStorage) GetStorage() (StorageConfig, error) {
|
||||||
return t.c, nil
|
return t.c, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user