1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 16:26:11 +00:00

Add more checks for tests

This commit is contained in:
Alexander Neumann 2016-08-01 21:12:23 +02:00
parent 50b724ca23
commit f1bc181c5b

View file

@ -20,13 +20,30 @@ func TestCheckRepo(t testing.TB, repo *repository.Repository) {
done := make(chan struct{}) done := make(chan struct{})
defer close(done) defer close(done)
// packs
errChan := make(chan error) errChan := make(chan error)
go chkr.Packs(errChan, done)
for err := range errChan {
t.Error(err)
}
// structure
errChan = make(chan error)
go chkr.Structure(errChan, done) go chkr.Structure(errChan, done)
for err := range errChan { for err := range errChan {
t.Error(err) t.Error(err)
} }
// unused blobs
blobs := chkr.UnusedBlobs()
if len(blobs) > 0 {
t.Errorf("unused blobs found: %v", blobs)
}
// read data
errChan = make(chan error) errChan = make(chan error)
go chkr.ReadData(nil, errChan, done) go chkr.ReadData(nil, errChan, done)