Skip to content
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

Add tags and appliesTo to protocol tests #696

Merged
merged 1 commit into from
Jan 28, 2021
Merged

Conversation

mtdowling
Copy link
Member

This commit adds support for applying tags to individual test cases,
allowing them to be grouped much more granularly. It also adds support
for appliesTo, which allows test cases to indicate if they should only
be implemented by clients or servers. Test cases that do not define an
appliesTo member are to be implemented by both client and server
implementations.

Existing AWS protocol tests are updated to now utilize appliesTo rather
than adding tags to operations.

@mtdowling mtdowling requested a review from kstich January 28, 2021 00:09
smithy-aws-protocol-tests/model/awsJson1_0/errors.smithy Outdated Show resolved Hide resolved
@@ -265,7 +265,6 @@ structure InputAndOutputWithHeadersIO {
/// Null and empty headers are not sent over the wire.
@readonly
@http(uri: "/NullAndEmptyHeadersClient", method: "GET")
@tags(["client-only"])
operation NullAndEmptyHeadersClient {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these operations be consolidated now that the distinction is on the tests themselves? This would require removing the operation level tags, though, and possibly cause a downstream issue. Maybe we just consolidate this as a followup.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm adding tags back for now, this will need to wait. But it's a good idea.

@@ -265,7 +265,6 @@ structure InputAndOutputWithHeadersIO {
/// Null and empty headers are not sent over the wire.
@readonly
@http(uri: "/NullAndEmptyHeadersClient", method: "GET")
@tags(["client-only"])
operation NullAndEmptyHeadersClient {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these operations be consolidated now that the distinction is on the tests themselves? This would require removing the operation level tags, though, and possibly cause a downstream issue. Maybe we just consolidate this as a followup.

This commit adds support for applying tags to individual test cases,
allowing them to be grouped much more granularly. It also adds support
for appliesTo, which allows test cases to indicate if they should only
be implemented by clients or servers. Test cases that do not define an
appliesTo member are to be implemented by both client and server
implementations.

Existing AWS protocol tests are updated to now utilize appliesTo, and
the tags are left as-is. These tags will be removed in the future once
implementations have migrated away from them.
@mtdowling mtdowling merged commit 3dadd3a into main Jan 28, 2021
@kstich kstich mentioned this pull request Feb 22, 2021
@mtdowling mtdowling deleted the add-tags-to-protocol-tests branch April 21, 2021 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants