Remove Each(), add basic stats

This commit is contained in:
Alexander Neumann 2015-02-17 23:05:23 +01:00
parent 4bb7f2f2ed
commit b6f25aa690
6 changed files with 82 additions and 71 deletions

View file

@ -123,3 +123,18 @@ func BenchmarkSaveFrom(t *testing.B) {
ok(t, err)
}
}
func TestServerStats(t *testing.T) {
be := setupBackend(t)
defer teardownBackend(t, be)
key := setupKey(t, be, "geheim")
server := restic.NewServerWithKey(be, key)
// archive a few files
sn := snapshot(t, server, *benchArchiveDirectory)
t.Logf("archived snapshot %v", sn.ID)
stats, err := server.Stats()
ok(t, err)
t.Logf("stats: %v", stats)
}