aboutsummaryrefslogtreecommitdiff
path: root/backup
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2017-09-29 07:57:09 +0200
committerLaria Carolin Chabowski <laria@laria.me>2017-10-03 15:01:38 +0200
commitc04bbf9c82f216891ba44b8b5b621b8020963086 (patch)
treea2e0809ea5e4a0cf2dfd921b6b6c79e48a9d5de7 /backup
parent55053d116a79d681dc10d0e905371533e1a43299 (diff)
downloadpetrific-c04bbf9c82f216891ba44b8b5b621b8020963086.tar.gz
petrific-c04bbf9c82f216891ba44b8b5b621b8020963086.tar.bz2
petrific-c04bbf9c82f216891ba44b8b5b621b8020963086.zip
Restructure package storage
Diffstat (limited to 'backup')
-rw-r--r--backup/backup_test.go5
-rw-r--r--backup/restore_test.go6
2 files changed, 6 insertions, 5 deletions
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)