Skip to content

Commit

Permalink
Rebase on updated origin/master.
Browse files Browse the repository at this point in the history
Fix the test to not be sensitive to array ordering.
Re-generate on master as there was a schema change.
  • Loading branch information
Chris Pride committed Apr 18, 2022
1 parent ee3c216 commit fc582da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion codegen/testserver/followschema/nulls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func TestNullBubbling(t *testing.T) {
}
err := c.Post(`query { valid, errorBubbleList { id } }`, &resp)

require.EqualError(t, err, `[{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",2]},{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",1]}]`)
require.Contains(t, err.Error(), `{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",2]}`)
require.Contains(t, err.Error(), `{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",1]}`)
require.Nil(t, resp.ErrorBubbleList)
require.Equal(t, "Ok", resp.Valid)
})
Expand Down
2 changes: 1 addition & 1 deletion codegen/testserver/followschema/schema.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion codegen/testserver/singlefile/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion codegen/testserver/singlefile/nulls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func TestNullBubbling(t *testing.T) {
}
err := c.Post(`query { valid, errorBubbleList { id } }`, &resp)

require.EqualError(t, err, `[{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",2]},{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",1]}]`)
require.Contains(t, err.Error(), `{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",2]}`)
require.Contains(t, err.Error(), `{"message":"the requested element is null which the schema does not allow","path":["errorBubbleList",1]}`)
require.Nil(t, resp.ErrorBubbleList)
require.Equal(t, "Ok", resp.Valid)
})
Expand Down

0 comments on commit fc582da

Please sign in to comment.