-
Notifications
You must be signed in to change notification settings - Fork 105
Add ability to filter tests #360
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds the ability to filter certain test cases. Reasons for doing this might include wanting to skip tests for a feature not yet implemented or wanting to skip a test whose asserted http request is only one of several valid options.
Sweet, we need to run a codegen along with this too |
Temporarily closing because I realized that ts doesn't have a hook into the protocol test generation like go does |
This updates the way protocol tests are generated. Instead of always generating http protocol tests, it now relies on protocols to initiate test generation. This is important for non-http protocols. It's also important for being able to customize the generation for http protocols. There is an unfortunate implication - a test file will always be generated now. This shouldn't *really* matter since that won't be part of the uploaded artifacts anyway.
adamthom-amzn
approved these changes
Jun 21, 2021
alexforsyth
approved these changes
Jun 21, 2021
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.
+1
gosar
added a commit
to gosar/smithy-typescript
that referenced
this pull request
Jun 22, 2022
Instead of DeferredWriter passes the WriterDelegator along in GenerationContext so generateProtocolTests can create the file only if any tests need to be written. This is alternative to smithy-lang@09b9956 from smithy-lang#360. It is going back to using writerDelegator like before (and picking the fileName inside the test generation logic, instead of in DirectedTypeScriptCodegen.
gosar
added a commit
to gosar/smithy-typescript
that referenced
this pull request
Jul 1, 2022
Instead of DeferredWriter passes the WriterDelegator along in GenerationContext so generateProtocolTests can create the file only if any tests need to be written. This is alternative to smithy-lang@09b9956 from smithy-lang#360. It is going back to using writerDelegator like before (and picking the fileName inside the test generation logic, instead of in DirectedTypeScriptCodegen.
gosar
added a commit
to gosar/smithy-typescript
that referenced
this pull request
Jul 1, 2022
Instead of DeferredWriter passes the WriterDelegator along in GenerationContext so generateProtocolTests can create the file only if any tests need to be written. This is alternative to smithy-lang@09b9956 from smithy-lang#360. It is going back to using writerDelegator like before (and picking the fileName inside the test generation logic, instead of in DirectedTypeScriptCodegen.
gosar
added a commit
that referenced
this pull request
Jul 1, 2022
Instead of DeferredWriter passes the WriterDelegator along in GenerationContext so generateProtocolTests can create the file only if any tests need to be written. This is alternative to 09b9956 from #360. It is going back to using writerDelegator like before (and picking the fileName inside the test generation logic, instead of in DirectedTypeScriptCodegen.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the ability to filter certain test cases. Reasons for doing this might include wanting to skip tests for a feature not yet implemented or wanting to skip a test whose asserted http request is only one of several valid options.
smithy-go has something similar, but rather than having a functional interface they have a locked down builder where you must be very explicit on what you want to skip. My motivation for going with the functional interface instead was to address complexity around generating for input/output/error and to allow for more easily skipping based on things in the settings (such as client vs ssdk). I could be convinced to go their way though.
see also: aws/aws-sdk-js-v3#2506
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.