Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Migrate gql introspection tests to new framework (#1211)
* Use reflect for action bundling The code is shorter but more complex. Importantly it means that we do not need to remember to add new action types to 3 code locations (len calc, flatten, main-loop) within the framework, something that is error prone and a bit of a hassle. * Add gql introspection support to test framework Code is copy-pasted from existing schema/utils.go file, plus a couple of compilation tweaks and var renames. * Migrate client_test.go to new framework No changes to test content * Migrate filter_test.go to new framework No changes to test contents * Migrate input_type_test.go to new framework No changes to test contents * Migrate simple_test.go to new framework Due to differences in error handling some of these tests have changed slightly. In the old introspection tests, `ExpectedErrrors` would be compared against errrors generated during schema update, and during introspection - the new framework ties an expected error to a specific action. For these tests it is now clear that the errors occur on schema update, and not during introspection. This means that in the original, the introspection query was declared but never actually run (test would exist early on expected error), as such this commit also removes the declaration of these never-executed introspection queries. * Migrate with_inline_array_test.go to new framework No changes to test contents * Migrate inline_array_test.go to new framework No changes to test contents * Migrate simple_test.go to new framework No changes to test contents * Migrate top_level_test.go to new framework No changes to test contents * Remove old test utils
- Loading branch information