Commit 4836fe93 authored by Nick Cabatoff's avatar Nick Cabatoff

Ensure that deletion of a non-existent key does not produce an error.

parent 6735c75a
......@@ -126,13 +126,18 @@ func SubtestNotFounds(t *testing.T, ds dstore.Datastore) {
switch err {
case dstore.ErrNotFound:
case nil:
t.Fatal("expected error getting size after delete")
t.Fatal("expected error getting size of not found key")
default:
t.Fatal("wrong error getting size after delete: ", err)
t.Fatal("wrong error getting size of not found key", err)
}
if size != -1 {
t.Fatal("expected missing size to be -1")
}
err = ds.Delete(badk)
if err != nil {
t.Fatal("error calling delete on not found key: ", err)
}
}
func SubtestLimit(t *testing.T, ds dstore.Datastore) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment