add MemBackend and MockBackend

This commit is contained in:
Alexander Neumann 2015-11-22 16:12:00 +01:00
parent da71da23d9
commit 9cb4e14327
3 changed files with 209 additions and 0 deletions

View file

@ -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)