From c04bbf9c82f216891ba44b8b5b621b8020963086 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Fri, 29 Sep 2017 07:57:09 +0200 Subject: Restructure package storage --- backup/backup_test.go | 5 +++-- backup/restore_test.go | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'backup') diff --git a/backup/backup_test.go b/backup/backup_test.go index da14117..a7f7ff9 100644 --- a/backup/backup_test.go +++ b/backup/backup_test.go @@ -6,6 +6,7 @@ import ( "code.laria.me/petrific/fs" "code.laria.me/petrific/objects" "code.laria.me/petrific/storage" + "code.laria.me/petrific/storage/memory" "testing" ) @@ -27,7 +28,7 @@ func wantObject( } func TestWriteLargeFile(t *testing.T) { - s := storage.NewMemoryStorage() + s := memory.NewMemoryStorage() id, err := WriteFile(s, bytes.NewReader(content_largefile)) if err != nil { @@ -61,7 +62,7 @@ func mkfile(t *testing.T, d fs.Dir, name string, exec bool, content []byte) { } func TestWriteDir(t *testing.T) { - s := storage.NewMemoryStorage() + s := memory.NewMemoryStorage() root := fs.NewMemoryFSRoot("root") diff --git a/backup/restore_test.go b/backup/restore_test.go index 9e6e525..db66e11 100644 --- a/backup/restore_test.go +++ b/backup/restore_test.go @@ -4,7 +4,7 @@ import ( "bytes" "code.laria.me/petrific/fs" "code.laria.me/petrific/objects" - "code.laria.me/petrific/storage" + "code.laria.me/petrific/storage/memory" "io" "testing" ) @@ -71,7 +71,7 @@ func wantDir(n int, fx func(*testing.T, fs.Dir)) func(*testing.T, fs.File) { } func TestRestoreDir(t *testing.T) { - s := storage.NewMemoryStorage() + s := memory.NewMemoryStorage() s.Set(objid_emptyfile, objects.OTFile, obj_emptyfile) s.Set(objid_fooblob, objects.OTBlob, obj_fooblob) @@ -109,7 +109,7 @@ func TestRestoreDir(t *testing.T) { } func TestRestoreLargeFile(t *testing.T) { - s := storage.NewMemoryStorage() + s := memory.NewMemoryStorage() s.Set(objid_largefile_blob0, objects.OTBlob, obj_largefile_blob0) s.Set(objid_largefile_blob1, objects.OTBlob, obj_largefile_blob1) s.Set(objid_largefile, objects.OTFile, obj_largefile) -- cgit v1.2.3-70-g09d2