forked from TrueCloudLab/restic
add MemBackend and MockBackend
This commit is contained in:
parent
da71da23d9
commit
9cb4e14327
3 changed files with 209 additions and 0 deletions
|
@ -96,6 +96,11 @@ func testBackend(b backend.Backend, t *testing.T) {
|
|||
err = b.Remove(tpe, test.id)
|
||||
OK(t, err)
|
||||
|
||||
// test that the blob is gone
|
||||
ok, err := b.Test(tpe, test.id)
|
||||
OK(t, err)
|
||||
Assert(t, ok == false, "removed blob still present")
|
||||
|
||||
// create blob
|
||||
blob, err = b.Create()
|
||||
OK(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue