Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to ensure that Delete returns no error for missing keys #162

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/basic_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down