Skip to content

Commit ee87925

Browse files
Codegen for #3414: Protocol tests response object validation
1 parent 6f8dc2f commit ee87925

File tree

297 files changed

+2701
-1350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+2701
-1350
lines changed

generated/protocol-tests/tests/input/ec2/tests/EmptyInputAndEmptyOutputTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ AWS_PROTOCOL_TEST(EmptyInputAndEmptyOutput, Ec2QueryEmptyInputAndEmptyOutput) {
1919
EmptyInputAndEmptyOutputRequest request;
2020

2121
auto outcome = client.EmptyInputAndEmptyOutput(request);
22-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
23-
2422
ExpectedRequest expectedRq;
2523
expectedRq.method = "POST";
2624
expectedRq.body = "QWN0aW9uPUVtcHR5SW5wdXRBbmRFbXB0eU91dHB1dCZWZXJzaW9uPTIwMjAtMDEtMDg=";
2725
expectedRq.uri = "/";
2826
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
2927
ValidateRequestSent(expectedRq);
28+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3029
}

generated/protocol-tests/tests/input/ec2/tests/EndpointOperationTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ AWS_PROTOCOL_TEST(EndpointOperation, Ec2QueryEndpointTrait) {
1919
EndpointOperationRequest request;
2020

2121
auto outcome = client.EndpointOperation(request);
22-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
23-
2422
ExpectedRequest expectedRq;
2523
expectedRq.method = "POST";
2624
expectedRq.body = "QWN0aW9uPUVuZHBvaW50T3BlcmF0aW9uJlZlcnNpb249MjAyMC0wMS0wOA==";
2725
expectedRq.uri = "/";
2826
expectedRq.host = "foo.example.com";
2927
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
3028
ValidateRequestSent(expectedRq);
29+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3130
}

generated/protocol-tests/tests/input/ec2/tests/EndpointWithHostLabelOperationTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ AWS_PROTOCOL_TEST(EndpointWithHostLabelOperation, Ec2QueryEndpointTraitWithHostL
2020
request.SetLabel(R"(bar)");
2121

2222
auto outcome = client.EndpointWithHostLabelOperation(request);
23-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
24-
2523
ExpectedRequest expectedRq;
2624
expectedRq.method = "POST";
2725
expectedRq.body = "QWN0aW9uPUVuZHBvaW50V2l0aEhvc3RMYWJlbE9wZXJhdGlvbiZWZXJzaW9uPTIwMjAtMDEtMDgmTGFiZWw9YmFy";
2826
expectedRq.uri = "/";
2927
expectedRq.host = "foo.bar.example.com";
3028
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
3129
ValidateRequestSent(expectedRq);
30+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3231
}

generated/protocol-tests/tests/input/ec2/tests/HostWithPathOperationTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ AWS_PROTOCOL_TEST(HostWithPathOperation, Ec2QueryHostWithPath) {
1919
HostWithPathOperationRequest request;
2020

2121
auto outcome = client.HostWithPathOperation(request);
22-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
23-
2422
ExpectedRequest expectedRq;
2523
expectedRq.method = "POST";
2624
expectedRq.body = "QWN0aW9uPUhvc3RXaXRoUGF0aE9wZXJhdGlvbiZWZXJzaW9uPTIwMjAtMDEtMDg=";
2725
expectedRq.uri = "/custom/";
2826
expectedRq.host = "example.com/custom";
2927
ValidateRequestSent(expectedRq);
28+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3029
}

generated/protocol-tests/tests/input/ec2/tests/NestedStructuresTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ AWS_PROTOCOL_TEST(NestedStructures, Ec2NestedStructures) {
3030
}
3131

3232
auto outcome = client.NestedStructures(request);
33-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
34-
3533
ExpectedRequest expectedRq;
3634
expectedRq.method = "POST";
3735
expectedRq.body = "QWN0aW9uPU5lc3RlZFN0cnVjdHVyZXMmVmVyc2lvbj0yMDIwLTAxLTA4Jk5lc3RlZC5TdHJpbmdBcmc9Zm9vJk5lc3RlZC5PdGhlckFyZz10cnVlJk5lc3RlZC5SZWN1cnNpdmVBcmcuU3RyaW5nQXJnPWJheg==";
3836
expectedRq.uri = "/";
3937
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
4038
expectedRq.requireHeaders = {"Content-Length"};
4139
ValidateRequestSent(expectedRq);
40+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
4241
}

generated/protocol-tests/tests/input/ec2/tests/NoInputAndOutputTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ AWS_PROTOCOL_TEST(NoInputAndOutput, Ec2QueryNoInputAndOutput) {
1919
NoInputAndOutputRequest request;
2020

2121
auto outcome = client.NoInputAndOutput(request);
22-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
23-
2422
ExpectedRequest expectedRq;
2523
expectedRq.method = "POST";
2624
expectedRq.body = "QWN0aW9uPU5vSW5wdXRBbmRPdXRwdXQmVmVyc2lvbj0yMDIwLTAxLTA4";
2725
expectedRq.uri = "/";
2826
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
2927
ValidateRequestSent(expectedRq);
28+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3029
}

generated/protocol-tests/tests/input/ec2/tests/PutWithContentEncodingTest.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,12 @@ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
148148
)");
149149

150150
auto outcome = client.PutWithContentEncoding(request);
151-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
152-
153151
ExpectedRequest expectedRq;
154152
expectedRq.method = "POST";
155153
expectedRq.uri = "/";
156154
expectedRq.headers = {{"Content-Encoding", R"(gzip)"}};
157155
ValidateRequestSent(expectedRq);
156+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
158157
}
159158

160159
AWS_PROTOCOL_TEST(PutWithContentEncoding, SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query) {
@@ -295,11 +294,10 @@ EcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr
295294
)");
296295

297296
auto outcome = client.PutWithContentEncoding(request);
298-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
299-
300297
ExpectedRequest expectedRq;
301298
expectedRq.method = "POST";
302299
expectedRq.uri = "/";
303300
expectedRq.headers = {{"Content-Encoding", R"(gzip)"}};
304301
ValidateRequestSent(expectedRq);
302+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
305303
}

generated/protocol-tests/tests/input/ec2/tests/QueryIdempotencyTokenAutoFillTest.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ AWS_PROTOCOL_TEST(QueryIdempotencyTokenAutoFill, Ec2ProtocolIdempotencyTokenAuto
1919
QueryIdempotencyTokenAutoFillRequest request;
2020

2121
auto outcome = client.QueryIdempotencyTokenAutoFill(request);
22-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
23-
2422
ExpectedRequest expectedRq;
2523
expectedRq.method = "POST";
2624
expectedRq.body = "QWN0aW9uPVF1ZXJ5SWRlbXBvdGVuY3lUb2tlbkF1dG9GaWxsJlZlcnNpb249MjAyMC0wMS0wOCZUb2tlbj0wMDAwMDAwMC0wMDAwLTQwMDAtODAwMC0wMDAwMDAwMDAwMDA=";
2725
expectedRq.uri = "/";
2826
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
2927
expectedRq.requireHeaders = {"Content-Length"};
3028
ValidateRequestSent(expectedRq);
29+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3130
}
3231

3332
AWS_PROTOCOL_TEST(QueryIdempotencyTokenAutoFill, Ec2ProtocolIdempotencyTokenAutoFillIsSet) {
@@ -39,13 +38,12 @@ AWS_PROTOCOL_TEST(QueryIdempotencyTokenAutoFill, Ec2ProtocolIdempotencyTokenAuto
3938
request.SetToken(R"(00000000-0000-4000-8000-000000000123)");
4039

4140
auto outcome = client.QueryIdempotencyTokenAutoFill(request);
42-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
43-
4441
ExpectedRequest expectedRq;
4542
expectedRq.method = "POST";
4643
expectedRq.body = "QWN0aW9uPVF1ZXJ5SWRlbXBvdGVuY3lUb2tlbkF1dG9GaWxsJlZlcnNpb249MjAyMC0wMS0wOCZUb2tlbj0wMDAwMDAwMC0wMDAwLTQwMDAtODAwMC0wMDAwMDAwMDAxMjM=";
4744
expectedRq.uri = "/";
4845
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
4946
expectedRq.requireHeaders = {"Content-Length"};
5047
ValidateRequestSent(expectedRq);
48+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
5149
}

generated/protocol-tests/tests/input/ec2/tests/QueryListsTest.cpp

+5-10
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ AWS_PROTOCOL_TEST(QueryLists, Ec2Lists) {
3030
}
3131

3232
auto outcome = client.QueryLists(request);
33-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
34-
3533
ExpectedRequest expectedRq;
3634
expectedRq.method = "POST";
3735
expectedRq.body = "QWN0aW9uPVF1ZXJ5TGlzdHMmVmVyc2lvbj0yMDIwLTAxLTA4Jkxpc3RBcmcuMT1mb28mTGlzdEFyZy4yPWJhciZMaXN0QXJnLjM9YmF6JkNvbXBsZXhMaXN0QXJnLjEuSGk9aGVsbG8mQ29tcGxleExpc3RBcmcuMi5IaT1ob2xh";
3836
expectedRq.uri = "/";
3937
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
4038
ValidateRequestSent(expectedRq);
39+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
4140
}
4241

4342
AWS_PROTOCOL_TEST(QueryLists, Ec2EmptyQueryLists) {
@@ -49,14 +48,13 @@ AWS_PROTOCOL_TEST(QueryLists, Ec2EmptyQueryLists) {
4948
request.SetListArg({});
5049

5150
auto outcome = client.QueryLists(request);
52-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
53-
5451
ExpectedRequest expectedRq;
5552
expectedRq.method = "POST";
5653
expectedRq.body = "QWN0aW9uPVF1ZXJ5TGlzdHMmVmVyc2lvbj0yMDIwLTAxLTA4";
5754
expectedRq.uri = "/";
5855
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
5956
ValidateRequestSent(expectedRq);
57+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
6058
}
6159

6260
AWS_PROTOCOL_TEST(QueryLists, Ec2ListArgWithXmlNameMember) {
@@ -68,14 +66,13 @@ AWS_PROTOCOL_TEST(QueryLists, Ec2ListArgWithXmlNameMember) {
6866
request.SetListArgWithXmlNameMember({R"(A)", R"(B)"});
6967

7068
auto outcome = client.QueryLists(request);
71-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
72-
7369
ExpectedRequest expectedRq;
7470
expectedRq.method = "POST";
7571
expectedRq.body = "QWN0aW9uPVF1ZXJ5TGlzdHMmVmVyc2lvbj0yMDIwLTAxLTA4Jkxpc3RBcmdXaXRoWG1sTmFtZU1lbWJlci4xPUEmTGlzdEFyZ1dpdGhYbWxOYW1lTWVtYmVyLjI9Qg==";
7672
expectedRq.uri = "/";
7773
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
7874
ValidateRequestSent(expectedRq);
75+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
7976
}
8077

8178
AWS_PROTOCOL_TEST(QueryLists, Ec2ListMemberWithXmlName) {
@@ -87,14 +84,13 @@ AWS_PROTOCOL_TEST(QueryLists, Ec2ListMemberWithXmlName) {
8784
request.SetListArgWithXmlName({R"(A)", R"(B)"});
8885

8986
auto outcome = client.QueryLists(request);
90-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
91-
9287
ExpectedRequest expectedRq;
9388
expectedRq.method = "POST";
9489
expectedRq.body = "QWN0aW9uPVF1ZXJ5TGlzdHMmVmVyc2lvbj0yMDIwLTAxLTA4JkhpLjE9QSZIaS4yPUI=";
9590
expectedRq.uri = "/";
9691
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
9792
ValidateRequestSent(expectedRq);
93+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
9894
}
9995

10096
AWS_PROTOCOL_TEST(QueryLists, Ec2ListNestedStructWithList) {
@@ -110,12 +106,11 @@ AWS_PROTOCOL_TEST(QueryLists, Ec2ListNestedStructWithList) {
110106
}
111107

112108
auto outcome = client.QueryLists(request);
113-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
114-
115109
ExpectedRequest expectedRq;
116110
expectedRq.method = "POST";
117111
expectedRq.body = "QWN0aW9uPVF1ZXJ5TGlzdHMmVmVyc2lvbj0yMDIwLTAxLTA4Jk5lc3RlZFdpdGhMaXN0Lkxpc3RBcmcuMT1BJk5lc3RlZFdpdGhMaXN0Lkxpc3RBcmcuMj1C";
118112
expectedRq.uri = "/";
119113
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
120114
ValidateRequestSent(expectedRq);
115+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
121116
}

generated/protocol-tests/tests/input/ec2/tests/QueryTimestampsTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ AWS_PROTOCOL_TEST(QueryTimestamps, Ec2TimestampsInput) {
2222
request.SetEpochTarget(Aws::Utils::DateTime(1422172800L));
2323

2424
auto outcome = client.QueryTimestamps(request);
25-
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
26-
2725
ExpectedRequest expectedRq;
2826
expectedRq.method = "POST";
2927
expectedRq.body = "QWN0aW9uPVF1ZXJ5VGltZXN0YW1wcyZWZXJzaW9uPTIwMjAtMDEtMDgmTm9ybWFsRm9ybWF0PTIwMTUtMDEtMjVUMDglM0EwMCUzQTAwWiZFcG9jaE1lbWJlcj0xNDIyMTcyODAwJkVwb2NoVGFyZ2V0PTE0MjIxNzI4MDA=";
3028
expectedRq.uri = "/";
3129
expectedRq.headers = {{"Content-Type", R"(application/x-www-form-urlencoded)"}};
3230
expectedRq.requireHeaders = {"Content-Length"};
3331
ValidateRequestSent(expectedRq);
32+
AWS_ASSERT_SUCCESS(outcome) << outcome.GetError();
3433
}

0 commit comments

Comments
 (0)