Skip to content

Commit

Permalink
Break up aws json protocol tests
Browse files Browse the repository at this point in the history
This breaks up the aws json protocol test operations into their own
files. This helps a bit to make them easier to read, though the
kitchen sink operation being so big is not helpful in that regard.
  • Loading branch information
JordonPhillips committed Jun 23, 2020
1 parent 32dec94 commit 3455529
Show file tree
Hide file tree
Showing 4 changed files with 917 additions and 896 deletions.
42 changes: 42 additions & 0 deletions smithy-aws-protocol-tests/model/awsJson1_1/empty-operation.smithy
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
$version: "1.0"

namespace aws.protocoltests.json

use aws.protocols#awsJson1_1
use smithy.test#httpRequestTests
use smithy.test#httpResponseTests

@httpRequestTests([
{
id: "sends_requests_to_slash",
protocol: awsJson1_1,
documentation: "Sends requests to /",
method: "POST",
uri: "/",
},
{
id: "includes_x_amz_target_and_content_type",
protocol: awsJson1_1,
documentation: "Includes X-Amz-Target header and Content-Type",
headers: {
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "JsonProtocol.EmptyOperation",
},
method: "POST",
uri: "/",
},
])
@httpResponseTests([
{
id: "handles_empty_output_shape",
protocol: awsJson1_1,
documentation: "Handles empty output shapes",
body: "{}",
bodyMediaType: "application/json",
headers: {
"Content-Type": "application/x-amz-json-1.1",
},
code: 200,
},
])
operation EmptyOperation {}
Loading

0 comments on commit 3455529

Please sign in to comment.