Add more checks for tests

This commit is contained in:
Alexander Neumann 2016-08-01 21:12:23 +02:00
parent 50b724ca23
commit f1bc181c5b
1 changed files with 17 additions and 0 deletions

View File

@ -20,13 +20,30 @@ func TestCheckRepo(t testing.TB, repo *repository.Repository) {
done := make(chan struct{})
defer close(done)
// packs
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)
for err := range errChan {
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)
go chkr.ReadData(nil, errChan, done)