async-graphql/tests
Dominik Spicher b020ce5aee tests/federation: compare export_sdl against expected schema
This commit adds logic to two unit tests where the schema
export is compared against expected output cached in two
schema files.

This is intended to help prevent bugs like the ones fixed in
faf407b or the immediately succeeding commit, as unexpected
changes to schema export will become apparent in the commit
diff, easing reviews.

When legitimately changing the export output behaviour,
the test suite just needs to be run twice, as the unit-tests
automatically overwrite the files with the new version.

This unit-test approach is inspired by

https://matklad.github.io/2022/03/26/self-modifying-code.html
2022-08-29 22:23:28 +02:00
..
schemas tests/federation: compare export_sdl against expected schema 2022-08-29 22:23:28 +02:00
batch_request.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
binary.rs Implemented OutputType for Bytes. #569 2021-07-18 21:42:39 +08:00
complex_object.rs Remove code and tests related oneof fields. #915 2022-05-07 16:16:01 +08:00
connection.rs add nodes exposure on ConectionType so nesting through edges isn't always needed. (#952) 2022-06-17 00:12:07 +08:00
default_value.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
derived_field.rs misc: dbg missed 2021-10-28 15:55:00 +00:00
directive.rs Update docs 2021-11-20 11:16:48 +08:00
enum.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
error_ext.rs Clippy clean 2022-04-20 14:21:23 +08:00
extension.rs Rework connection types 2022-04-19 19:18:06 +08:00
federation.rs tests/federation: compare export_sdl against expected schema 2022-08-29 22:23:28 +02:00
field_features.rs Update docs 2021-11-20 11:16:48 +08:00
fields_merge.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
generic_types.rs Clippy clean 2022-04-20 14:21:23 +08:00
guard.rs Implement Guard for Fn 2022-06-30 10:50:45 +08:00
hygiene.rs Rework connection types 2022-04-19 19:18:06 +08:00
input_object.rs Fixes #1004 2022-08-05 14:50:29 +08:00
input_value.rs Rework connection types 2022-04-19 19:18:06 +08:00
interface_exporting.rs rustfmt 2021-12-05 09:43:44 +08:00
interface.rs Remove code and tests related oneof fields. #915 2022-05-07 16:16:01 +08:00
introspection_visible.rs Custom directive 2021-11-20 09:04:46 +08:00
introspection.rs Fix serializing of JSON default values (#969) 2022-07-05 06:55:01 +08:00
json_type.rs Rework connection types 2022-04-19 19:18:06 +08:00
lifetime.rs Clippy clean 2021-01-11 09:01:28 +08:00
list.rs Rework connection types 2022-04-19 19:18:06 +08:00
maybe_undefined.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
merged_object.rs Fix the problem that EmptyMutation may cause when used in MergedObject. #694 2021-11-08 08:45:14 +08:00
mut_args.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
mutation.rs Rework connection types 2022-04-19 19:18:06 +08:00
name_conflict.rs If a GraphQL name conflict is detected when creating schema, it will cause panic. #499 2021-11-08 10:25:31 +08:00
object.rs Add Schema::build_with_ignore_name_conflicts method to specifies a list to ignore type conflict detection. 2022-05-24 20:08:35 +08:00
oneof_object.rs Fixed OneofObject restriction on inner types being unique. #923 2022-05-14 16:43:28 +08:00
optional.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
preserve_order.rs Respect query object field order. #612 2021-10-26 19:02:15 +08:00
proc_macro_in_macro_rules.rs Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
raw_ident.rs Update docs 2021-11-20 11:16:48 +08:00
rename.rs Rework Extension 2021-04-04 14:37:41 +08:00
result.rs Update tests 2022-04-19 11:06:54 +08:00
scalar.rs Fix panic on f32-64::INFINITE/f32-64::NEG_INFINITE/f32-64::NAN output. #735 2021-12-02 20:19:17 +08:00
schema.rs Fix the problem that some integrations overwritten HTTP headers. #793 2022-01-24 14:14:07 +08:00
serializer_uuid.rs fix: add test case for serializing issue 2021-08-18 14:22:17 +00:00
simple_object.rs Fix typos (#951) 2022-06-15 22:18:39 +08:00
subscription_websocket_graphql_ws.rs Rework connection types 2022-04-19 19:18:06 +08:00
subscription_websocket_subscriptions_transport_ws.rs Rework connection types 2022-04-19 19:18:06 +08:00
subscription.rs Remove code and tests related oneof fields. #915 2022-05-07 16:16:01 +08:00
union.rs Support macro type in enum variant 2022-04-06 17:38:36 +02:00
use_type_description.rs Move the methods of the Type trait to InputType and OutputType. 2021-11-12 07:23:05 +08:00
validators.rs Remove code and tests related oneof fields. #915 2022-05-07 16:16:01 +08:00
variables.rs Rework connection types 2022-04-19 19:18:06 +08:00