Skip to content

Commit

Permalink
Merge pull request #472 from JordonPhillips/convert-awsjson-protocol-…
Browse files Browse the repository at this point in the history
…tests

Convert awsjson protocol tests to Smithy IDL
  • Loading branch information
JordonPhillips authored Jun 23, 2020
2 parents 57eff20 + 3455529 commit 1515ed8
Show file tree
Hide file tree
Showing 5 changed files with 994 additions and 1,157 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 1515ed8

Please sign in to comment.