Skip to content

Commit

Permalink
test: additional assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Aug 7, 2024
1 parent d1e352e commit 8a294b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ func TestHandlerNotFound(t *testing.T) {
result.MatchResultR0(rcpt.Out(), func(ipld.Node) {
t.Fatalf("expected error: %s", invs[0].Link())
}, func(rerr sdm.HandlerNotFoundErrorModel) {
fmt.Printf("%+v\n", rerr)
fmt.Printf("%s %+v\n", *rerr.Name, rerr)
if *rerr.Name != "HandlerNotFoundError" {
t.Fatalf("unexpected error name: %s", *rerr.Name)
}
})
}

Expand Down Expand Up @@ -178,6 +181,9 @@ func TestHandlerExecutionError(t *testing.T) {
result.MatchResultR0(rcpt.Out(), func(ipld.Node) {
t.Fatalf("expected error: %s", invs[0].Link())
}, func(rerr sdm.HandlerExecutionErrorModel) {
fmt.Printf("%+v\n", rerr)
fmt.Printf("%s %+v\n", *rerr.Name, rerr)
if *rerr.Name != "HandlerExecutionError" {
t.Fatalf("unexpected error name: %s", *rerr.Name)
}
})
}

0 comments on commit 8a294b1

Please sign in to comment.