Unverified Commit 123d227a authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #162 from ncabatoff/assert-delete-missing-key-not-error

Add test to ensure that Delete returns no error for missing keys
parents 6735c75a 4836fe93
......@@ -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