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

codegen: Remove protocol test skipping for supported features. #1630

Merged
merged 6 commits into from Jun 28, 2022

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Mar 17, 2022

Updates the SDK's code generation of protocol test to no longer skip
tests for features that are supported by the SDK.

Regenerates SDK API clients for aws/smithy-go#360 and previously skipped protocol tests

@jasdel jasdel requested a review from skmcgrail March 17, 2022 22:20
@jasdel
Copy link
Contributor Author

jasdel commented Mar 17, 2022

Created #1631 tracking endpoint prefix and host label protocol tests the SDK is skipping

@jasdel
Copy link
Contributor Author

jasdel commented Mar 23, 2022

Unit test failing because presigned URL behavior needs to deviate from regular API behavior and no include or remove the auto set content-type for operations with streaming input.

@skmcgrail
Copy link
Member

This change in behavior I believe is unexpected.

--- FAIL: TestPutObject_PresignURL (0.05s)
    --- FAIL: TestPutObject_PresignURL/nil_body_with_content-length (0.00s)
        presign_test.go:277: expected signed header to be map[Content-Length:[100] Host:[mock-bucket.s3.us-west-2.amazonaws.com]], got map[Content-Length:[100] Content-Type:[application/octet-stream] Host:[mock-bucket.s3.us-west-2.amazonaws.com]], 
             diff :   http.Header{
              	"Content-Length": {"100"},
            + 	"Content-Type":   {"application/octet-stream"},
              	"Host":           {"mock-bucket.s3.us-west-2.amazonaws.com"},
              }

jasdel added a commit to aws/smithy-go that referenced this pull request Jun 28, 2022
Updates the SDK's codegen for REST HTTP request payload to always include content-type header for operations with streaming request payloads. Prior the content-type header would only be added if the streaming request io.Reader was not nil.

Also adds a helper utility for setting if the content-type was automatically assigned by the operation serializer or not. Used by behavior that needs to know if an explicit or default value was provided for the content-type header.

Replaces: #360
Used by: aws/aws-sdk-go-v2#1630
@jasdel jasdel merged commit 3cc55fe into aws:main Jun 28, 2022
@jasdel jasdel deleted the updateSmithyTests branch June 28, 2022 22:12
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.

None yet

2 participants