mirror of
https://github.com/restic/restic.git
synced 2024-12-23 08:16:36 +00:00
Add more checks for tests
This commit is contained in:
parent
50b724ca23
commit
f1bc181c5b
1 changed files with 17 additions and 0 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue