mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-23 14:49:30 +01:00
Better failure messages for action only test failures
This commit is contained in:
parent
072a0d0a18
commit
e6b1bfd589
@ -219,7 +219,7 @@ func TestSearch(t *testing.T) {
|
||||
results, err := Search(ctx, db, "ls", 5)
|
||||
testutils.Check(t, err)
|
||||
if len(results) != 2 {
|
||||
t.Fatalf("Search() returned %d results, expected 2!", len(results))
|
||||
t.Fatalf("Search() returned %d results, expected 2, results=%#v", len(results), results)
|
||||
}
|
||||
if !data.EntryEquals(*results[0], entry2) {
|
||||
t.Fatalf("Search()[0]=%#v, expected: %#v", results[0], entry2)
|
||||
@ -251,7 +251,7 @@ func TestAddToDbIfNew(t *testing.T) {
|
||||
t.Fatal(result.Error)
|
||||
}
|
||||
if len(entries) != 2 {
|
||||
t.Fatalf("entries has an incorrect length: %d", len(entries))
|
||||
t.Fatalf("entries has an incorrect length: %d, entries=%#v", len(entries), entries)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user