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

Bug: Protocol tests added in Smithy 1.46.0 do not pass #1431

Closed
dayaffe opened this issue Apr 2, 2024 · 2 comments
Closed

Bug: Protocol tests added in Smithy 1.46.0 do not pass #1431

dayaffe opened this issue Apr 2, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@dayaffe
Copy link
Contributor

dayaffe commented Apr 2, 2024

Describe the bug

S3 URI resolution behavior when dealing with object keys that contain dot segments is incorrect (smithy-lang/smithy#2166)

Expected Behavior

All S3 protocol tests should pass

Current Behavior

Tests do not pass

Reproduction Steps

Test Case '-[S3TestSDKTests.GetObjectRequestTest testS3PreservesEmbeddedDotSegmentInUriLabel]' started.
/Users/dayaffe/Documents/Development/SwiftSDKWorkspace/UpdateSmithy/aws-sdk-swift/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/s3/swift-codegen/S3TestSDKTests/GetObjectRequestTest.swift:99: error: -[S3TestSDKTests.GetObjectRequestTest testS3PreservesEmbeddedDotSegmentInUriLabel] : failed - actual query items in Endpoint is nil but expected are not
/Users/dayaffe/Documents/Development/SwiftSDKWorkspace/UpdateSmithy/aws-sdk-swift/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/s3/swift-codegen/S3TestSDKTests/GetObjectRequestTest.swift:99: error: -[S3TestSDKTests.GetObjectRequestTest testS3PreservesEmbeddedDotSegmentInUriLabel] : XCTAssertEqual failed: ("foo/../key.txt") is not equal to ("/mybucket/foo/../key.txt")
/Users/dayaffe/Documents/Development/SwiftSDKWorkspace/UpdateSmithy/aws-sdk-swift/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/s3/swift-codegen/S3TestSDKTests/GetObjectRequestTest.swift:99: error: -[S3TestSDKTests.GetObjectRequestTest testS3PreservesEmbeddedDotSegmentInUriLabel] : XCTAssertEqual failed: ("mybucket.s3.us-west-2.amazonaws.com") is not equal to ("s3.us-west-2.amazonaws.com")
Test Case '-[S3TestSDKTests.GetObjectRequestTest testS3PreservesEmbeddedDotSegmentInUriLabel]' failed (0.294 seconds).
Test Case '-[S3TestSDKTests.GetObjectRequestTest testS3PreservesLeadingDotSegmentInUriLabel]' started.
/Users/dayaffe/Documents/Development/SwiftSDKWorkspace/UpdateSmithy/aws-sdk-swift/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/s3/swift-codegen/S3TestSDKTests/GetObjectRequestTest.swift:50: error: -[S3TestSDKTests.GetObjectRequestTest testS3PreservesLeadingDotSegmentInUriLabel] : failed - actual query items in Endpoint is nil but expected are not
/Users/dayaffe/Documents/Development/SwiftSDKWorkspace/UpdateSmithy/aws-sdk-swift/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/s3/swift-codegen/S3TestSDKTests/GetObjectRequestTest.swift:50: error: -[S3TestSDKTests.GetObjectRequestTest testS3PreservesLeadingDotSegmentInUriLabel] : XCTAssertEqual failed: ("/../key.txt") is not equal to ("/mybucket/../key.txt")
/Users/dayaffe/Documents/Development/SwiftSDKWorkspace/UpdateSmithy/aws-sdk-swift/codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen/s3/swift-codegen/S3TestSDKTests/GetObjectRequestTest.swift:50: error: -[S3TestSDKTests.GetObjectRequestTest testS3PreservesLeadingDotSegmentInUriLabel] : XCTAssertEqual failed: ("mybucket.s3.us-west-2.amazonaws.com") is not equal to ("s3.us-west-2.amazonaws.com")
Test Case '-[S3TestSDKTests.GetObjectRequestTest testS3PreservesLeadingDotSegmentInUriLabel]' failed (0.002 seconds).
Test Suite 'GetObjectRequestTest' failed at 2024-04-02 17:11:24.558.
	 Executed 2 tests, with 6 failures (0 unexpected) in 0.296 (0.296) seconds

Possible Solution

No response

Additional Information/Context

No response

AWS SWIFT SDK version used

latest

Compiler and Version used

latest

Operating System and version

mac

@dayaffe dayaffe added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 2, 2024
@dayaffe dayaffe self-assigned this Apr 3, 2024
@dayaffe
Copy link
Contributor Author

dayaffe commented Apr 10, 2024

We have decided to disable the 2 tests in question in order to proceed with the upgrade. The tests are failing because we have a placeholder for endpoint resolution used only for protocol tests, not because of an actual failure. Go v2 and typescript SDKs also do not currently run these tests.

@dayaffe dayaffe closed this as completed Apr 10, 2024
@dayaffe dayaffe reopened this Apr 10, 2024
@sichanyoo
Copy link
Contributor

The 2 tests disabled here were moved to different location and are now run correctly. Refer to #1590 to details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants