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

Protocol tests applied to the wrong operations #1477

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

82marbag
Copy link
Contributor

Description of changes:

Some tests are applied to the wrong operations.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
@82marbag 82marbag requested a review from a team as a code owner October 31, 2022 11:05
jjant added a commit to smithy-lang/smithy-rs that referenced this pull request Oct 31, 2022
Marks these two tests as failing:
  - RestJsonWithPayloadExpectsImpliedContentType
  - RestJsonBodyMalformedMapNullKey
These will be fixed in smithy-lang/smithy#1477.
jjant added a commit to smithy-lang/smithy-rs that referenced this pull request Oct 31, 2022
* Add links to relevant issues/PRs for failing tests

* Update codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt

Co-authored-by: david-perez <d@vidp.dev>

* Make `build_router_and_make_request` return the response

* Use `rustWriter.write` over `rustWriter.rust` for incomplete rust code

* Run HttpMalformedRequest tests through router

* Don't assert on operation_extension

This causes HttpMalformedRequest tests to fail.

* Refactor code to avoid repetition

* Run ktlint

* Check operation extension for regular request tests

* Run ktlint

* Remove unused parameter from `makeRequest`

* Refactor checkRequest2

* Remove `checkRequest/2`, run new-style tests for malformed http requests

- Remove `checkRequest`, `checkRequest2` in favour
  of using `makeRequest`/`makeRequest2` directly
- Run service builder tests for MalformedHttpRequest tests

* Format comment better

* Remove `RestJsonStreamingTraitsRequireLengthWithBlob` from failing tests

This test actually passes fine, but is not relevant for the server.

* Add comment about `RestJsonHttpResponseCodeDefaultsToModeledCode`

* Remove channel assertion on `makeRequest2`

* Use `checkOperationExtension` for `makeRequest2`

* Attempt to use a channel for both `makeRequest/2`

* Go back to using channel for new api and operation extension for old api

* Fix malformedHttpRequest tests

* Add block around each API's tests

* Remove unrelated file

* Mark wrong tests as failing

Marks these two tests as failing:
  - RestJsonWithPayloadExpectsImpliedContentType
  - RestJsonBodyMalformedMapNullKey
These will be fixed in smithy-lang/smithy#1477.

Co-authored-by: david-perez <d@vidp.dev>
@sugmanue sugmanue merged commit 040caba into smithy-lang:main Nov 9, 2022
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