-
Notifications
You must be signed in to change notification settings - Fork 214
Refactor event stream tests with {client,server}IntegrationTest
s
#2342
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
Changes from 7 commits
58013c0
623c592
82053c2
5d53efc
c1e4bab
fcf69bd
573eea7
0a35b85
84f27a5
5b08533
47de13c
66f7741
e1c5cd2
c1cd042
7a60d7c
45e762a
1865cee
8223a98
5cadd33
2afb915
5970d74
2bc6b3f
449d4bb
6f8a5ef
4b57f01
8c5aa82
2086bd4
fefdb1a
fb15f43
c7887c9
489a9ab
897c0ab
2f92227
8f70237
64d23c8
ee389ae
eae2701
3aac2e0
43c8040
108fc18
a14463a
4567ff2
e952961
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ private fun <T : AbstractCodeWriter<T>, U> T.withTemplate( | |
* This enables conditionally wrapping a block in a prefix/suffix, e.g. | ||
* | ||
* ``` | ||
* writer.withBlock("Some(", ")", conditional = symbol.isOptional()) { | ||
* writer.conditionalBlock("Some(", ")", conditional = symbol.isOptional()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docs were wrong. |
||
* write("symbolValue") | ||
* } | ||
* ``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ private fun fillInBaseModel( | |
): String = """ | ||
namespace test | ||
|
||
use smithy.framework#ValidationException | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Prefer making this conditional rather than adding the test dependency to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Clients don't validate since the server should be the authority on what is valid. |
||
use aws.protocols#$protocolName | ||
|
||
union TestUnion { | ||
|
@@ -69,12 +70,28 @@ private fun fillInBaseModel( | |
MessageWithNoHeaderPayloadTraits: MessageWithNoHeaderPayloadTraits, | ||
SomeError: SomeError, | ||
} | ||
structure TestStreamInputOutput { @httpPayload @required value: TestStream } | ||
|
||
structure TestStreamInput { | ||
@httpLabel | ||
@required | ||
id: String, | ||
|
||
@httpPayload | ||
value: TestStream, | ||
} | ||
|
||
structure TestStreamOutput { | ||
@httpPayload | ||
value: TestStream | ||
} | ||
|
||
@http(method: "POST", uri: "/test/{id}") | ||
operation TestStreamOp { | ||
input: TestStreamInputOutput, | ||
output: TestStreamInputOutput, | ||
errors: [SomeError], | ||
input: TestStreamInput, | ||
output: TestStreamOutput, | ||
errors: [SomeError, ValidationException], | ||
} | ||
|
||
$extraServiceAnnotations | ||
@$protocolName | ||
service TestService { version: "123", operations: [TestStreamOp] } | ||
|
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.
This is probably not good
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.
This might break with @drganjoo 's PR, #2256
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.
It didn't 🤔