1
0
mirror of https://github.com/restic/restic.git synced 2024-06-28 08:00:52 +02:00
restic/snapshot_test.go

29 lines
598 B
Go
Raw Normal View History

2014-12-05 21:45:49 +01:00
package restic_test
2014-08-04 20:47:04 +02:00
import (
"testing"
"time"
2014-12-05 21:45:49 +01:00
"github.com/restic/restic"
2014-08-04 20:47:04 +02:00
)
2014-12-21 17:02:49 +01:00
func testSnapshot(t *testing.T, s restic.Server) {
2014-09-23 22:39:12 +02:00
var err error
sn, err := restic.NewSnapshot("/home/foobar")
ok(t, err)
// sn.Tree, err = restic.Blob{ID: backend.ParseID("c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2")}
// ok(t, err)
2014-08-04 20:47:04 +02:00
sn.Time, err = time.Parse(time.RFC3339Nano, "2014-08-03T17:49:05.378595539+02:00")
ok(t, err)
2014-09-23 22:39:12 +02:00
// _, err = sn.Save(be)
// ok(t, err)
}
func TestSnapshot(t *testing.T) {
repo := setupBackend(t)
defer teardownBackend(t, repo)
testSnapshot(t, repo)
2014-08-04 20:47:04 +02:00
}