1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00
restic/snapshot_test.go
2014-10-03 21:44:55 +02:00

28 lines
593 B
Go

package khepri_test
import (
"testing"
"time"
"github.com/fd0/khepri"
"github.com/fd0/khepri/backend"
)
func testSnapshot(t *testing.T, be backend.Server) {
var err error
sn := khepri.NewSnapshot("/home/foobar")
sn.Content, err = 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) {
repo := setupBackend(t)
defer teardownBackend(t, repo)
testSnapshot(t, repo)
}