-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
[Fusion] Add tests for various error cases #7006
Conversation
8a97a79
to
e2d2300
Compare
69328d3
to
af35a84
Compare
2598fef
to
84859e8
Compare
84859e8
to
3e81e5a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7006 +/- ##
==========================================
+ Coverage 77.19% 78.06% +0.86%
==========================================
Files 2389 2709 +320
Lines 117848 134475 +16627
==========================================
+ Hits 90971 104975 +14004
- Misses 26877 29500 +2623
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@tobias-tengler have marked the once that are tests that are not ok so we know what to fix? |
It's all but one test that isn't currently failing, mostly because of the errors. I've skipped them all for now though and made the previous |
Awesome ... I will have a look at it |
This PR adds a number of tests for both the handling of transport and individual subgraph errors. The
data
portion of the response is as expected in most cases, but errors and especially their paths are incorrect most of the time. This is problematic for error handling clients such as Relay which will expect error paths to the leaf field that has been nulled by the error.I've also added a new
TestSubgraph
andTestSubgraphCollection
to simplify simulating Fusion composition and execution in the scope of a single test without having to update the Demo Subgraphs used for other integration tests.This PR doesn't change any functionality, it just adds tests and the expected + current snapshot versions. I plan to use this as a foundation on which to submit subsequent PRs to (hopefully) address all of the issues surfaced by these tests.
I'm sorry for the large diff, but I wanted to have all error cases I could think of covered by tests before modifying the behavior and accidentally changing correct behavior.
3e81e5a: This commit shows what is currently produced, compared to the expected response.