Repository navigation
add recorpused rpcv2json protocol tests - #3254
Conversation
|
|
b738cee to
7a3ec4e
Compare
JordonPhillips
left a comment
There was a problem hiding this comment.
I think these all need a nice smithy format run too. Though please do that as a separate commit for now as it'll be impossible to review the diff otherwise.
| } | ||
| ]) | ||
|
|
||
| apply NoInputOutput @httpRequestTests([ |
There was a problem hiding this comment.
We need a test for the output being a unit type too
| use smithy.test#httpRequestTests | ||
| use smithy.test#httpResponseTests | ||
|
|
||
| apply QueryCompatErrorOp @httpRequestTests([ |
There was a problem hiding this comment.
We should also have a test asserting that the compat header isn't sent if compat mode isn't enabled
| } | ||
| ]) | ||
|
|
||
| apply QueryCompatError @httpResponseTests([ |
There was a problem hiding this comment.
This needs to use forbidHeaders
| input: QueryCompatErrorOpInput | ||
| output: QueryCompatErrorOpOutput |
There was a problem hiding this comment.
You should be using inline IO everywhere unless there's a specific reason not to.
| defaultBoolean: Boolean = false | ||
| defaultByte: Byte = 0 | ||
| defaultShort: Short = 0 | ||
| defaultInteger: Integer = 0 | ||
| defaultLong: Long = 0 | ||
| defaultFloat: Float = 0 | ||
| defaultDouble: Double = 0 | ||
| defaultString: String = "" | ||
| defaultBlob: Blob = "" | ||
| defaultEnum: CorpusStringEnum = "Foo" | ||
| defaultIntEnum: CorpusIntEnum = 1 |
There was a problem hiding this comment.
These defaults are identical to the zero values, and this very same structure has separate zero value members. Best to change them to something else.
| headerEvent: HeaderEvent | ||
| } | ||
|
|
||
| structure HeaderEvent { |
There was a problem hiding this comment.
This is missing shorts and bytes
| } | ||
| ]) | ||
|
|
||
| apply EventStreamError @eventStreamTests([ |
There was a problem hiding this comment.
These are all client tests, we also need server tests.
| travel in the payload of an initial-response event rather than in | ||
| HTTP response headers.""" | ||
| protocol: rpcv2Json | ||
| initialResponse: { |
There was a problem hiding this comment.
You should add forbidHeaders for the headers that shouldn't be here
There was a problem hiding this comment.
These should all forbid Content-Length in the initial http request since it's forbidden for streaming operations.
| blobEvent: BlobPayloadEvent | ||
| } | ||
|
|
||
| structure BlobPayloadEvent { |
There was a problem hiding this comment.
There's no structure / union eventPayload.
7a3ec4e to
dd7a135
Compare
Adds a new rpcv2json (+querycompatible) protocol test suite under our new corpus strategy.
Note that the models here do not build w/o #3248.
Generated and ran these new tests against aws/smithy-go#695.