forked from TrueCloudLab/restic
Small refactorings and ceosmetic changes
This commit is contained in:
parent
a906b9febe
commit
c9f1f08019
7 changed files with 97 additions and 111 deletions
|
@ -2,29 +2,17 @@ package restic_test
|
|||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic"
|
||||
"github.com/restic/restic/server"
|
||||
. "github.com/restic/restic/test"
|
||||
)
|
||||
|
||||
func testSnapshot(t *testing.T, s *server.Server) {
|
||||
var err error
|
||||
sn, err := restic.NewSnapshot([]string{"/home/foobar"})
|
||||
OK(t, err)
|
||||
// sn.Tree, err = restic.Blob{ID: backend.ParseID("c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2")}
|
||||
// ok(t, err)
|
||||
sn.Time, err = time.Parse(time.RFC3339Nano, "2014-08-03T17:49:05.378595539+02:00")
|
||||
OK(t, err)
|
||||
|
||||
// _, err = sn.Save(be)
|
||||
// ok(t, err)
|
||||
}
|
||||
|
||||
func TestSnapshot(t *testing.T) {
|
||||
func TestNewSnapshot(t *testing.T) {
|
||||
s := SetupBackend(t)
|
||||
defer TeardownBackend(t, s)
|
||||
|
||||
testSnapshot(t, s)
|
||||
paths := []string{"/home/foobar"}
|
||||
|
||||
_, err := restic.NewSnapshot(paths)
|
||||
OK(t, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue