-
Notifications
You must be signed in to change notification settings - Fork 77
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
test: test permutations of auth strategies & operations #2166
Conversation
1ffc1b7
to
748a274
Compare
transformers, | ||
resolverConfig, | ||
dataSourceStrategies: constructDataSourceStrategies(schema, strategy), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sync
and search
are not supported for SQL datasource strategies. But the fact that the transformation succeeds here probably means we're missing those validations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks for the callout
rules: AuthRule[], | ||
configuredAuthProviders: ConfiguredAuthProviders, | ||
typeName: string, | ||
context: TransformerSchemaVisitStepContextProvider, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit uncomfortable plumbing the transformer DataSourceProvider/transformer context through to this level, since we've avoided coupling up until now. But the validation needs to be able to tell if these are SQL strategies, and it's cleaner to centralize validations in a single file rather than spreading them through the transformer code, so this seemed like a compromise I could live with.
64d9afc
to
dd59aa3
Compare
dd59aa3
to
94622e5
Compare
Description of changes
Adds tests for iterating over single combinations of of auth strategies & operations, to cover some cases I couldn't find elsewhere. Also adds field-level auth rule combination tests. Adds support for generating snapshots as a developer tool for validating changes that impact resolver or stack resource generation.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.