Skip to content

Commit ce94028

Browse files
committed
checkErrors ignores the raw error for purposes of determining if the test passed or failed
1 parent d887704 commit ce94028

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gqltesting/testing.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ func checkErrors(t *testing.T, want, got []*errors.QueryError) {
102102
sortErrors(want)
103103
sortErrors(got)
104104

105+
// Clear the underlying error before the DeepEqual check. It's too
106+
// much to ask the tester to include the raw failing error.
107+
for _, err := range got {
108+
err.Err = nil
109+
}
110+
105111
if !reflect.DeepEqual(got, want) {
106112
t.Fatalf("unexpected error: got %+v, want %+v", got, want)
107113
}

0 commit comments

Comments
 (0)