2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-18 08:34:20 +00:00
restic/snapshot_test.go

29 lines
593 B
Go
Raw Normal View History

2014-08-04 18:47:04 +00:00
package khepri_test
import (
"testing"
"time"
"github.com/fd0/khepri"
2014-09-23 20:39:12 +00:00
"github.com/fd0/khepri/backend"
2014-08-04 18:47:04 +00:00
)
2014-09-23 20:39:12 +00:00
func testSnapshot(t *testing.T, be backend.Server) {
var err error
2014-08-04 20:46:14 +00:00
sn := khepri.NewSnapshot("/home/foobar")
2014-09-23 20:39:12 +00:00
sn.Content, err = backend.ParseID("c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2")
2014-08-04 18:47:04 +00:00
ok(t, err)
sn.Time, err = time.Parse(time.RFC3339Nano, "2014-08-03T17:49:05.378595539+02:00")
ok(t, err)
2014-09-23 20:39:12 +00: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 18:47:04 +00:00
}