Client Test

Client Test

rev. 3d2cf9bfcccf2cb5e5660fe2685c9174956bfcad (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/Cargo.toml

@@ -6,6 +39,40 @@
   26     26   
version = "1.4.0"
   27     27   
[dependencies.fastrand]
   28     28   
version = "2.0.0"
   29     29   
[dependencies.http]
   30     30   
version = "0.2.9"
   31     31   
[features]
   32     32   
test-util = ["aws-smithy-runtime/test-util"]
   33     33   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   34     34   
behavior-version-latest = []
   35     35   
rustls = ["aws-smithy-runtime/tls-rustls"]
          36  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   36     37   
gated-tests = []
   37         -
default = ["rt-tokio", "rustls"]
          38  +
default = ["rt-tokio", "rustls", "default-https-client"]
   38     39   
   39     40   

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/Cargo.toml

@@ -6,6 +39,40 @@
   26     26   
version = "1.4.0"
   27     27   
[dependencies.fastrand]
   28     28   
version = "2.0.0"
   29     29   
[dependencies.http]
   30     30   
version = "0.2.9"
   31     31   
[features]
   32     32   
test-util = ["aws-smithy-runtime/test-util"]
   33     33   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   34     34   
behavior-version-latest = []
   35     35   
rustls = ["aws-smithy-runtime/tls-rustls"]
          36  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   36     37   
gated-tests = []
   37         -
default = ["rt-tokio", "rustls"]
          38  +
default = ["rt-tokio", "rustls", "default-https-client"]
   38     39   
   39     40   

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/Cargo.toml

@@ -11,11 +66,67 @@
   31     31   
[dependencies.fastrand]
   32     32   
version = "2.0.0"
   33     33   
[dependencies.flate2]
   34     34   
version = "1.0.30"
   35     35   
[dependencies.http]
   36     36   
version = "0.2.9"
   37     37   
[dependencies.http-body]
   38     38   
version = "0.4.4"
   39     39   
[dependencies.tracing]
   40     40   
version = "0.1"
          41  +
[dev-dependencies.aws-smithy-http-client]
          42  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
          43  +
features = ["test-util"]
   41     44   
[dev-dependencies.aws-smithy-protocol-test]
   42     45   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   43         -
[dev-dependencies.aws-smithy-runtime]
   44         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   45         -
features = ["client", "test-util"]
   46     46   
[dev-dependencies.aws-smithy-types]
   47     47   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
   48     48   
[dev-dependencies.bytes]
   49     49   
version = "1.4.0"
   50     50   
[dev-dependencies.pretty_assertions]
   51     51   
version = "1.3.0"
   52     52   
[dev-dependencies.tokio]
   53     53   
version = "1.23.1"
   54     54   
features = ["macros", "test-util", "rt-multi-thread"]
   55     55   
[dev-dependencies.tracing-test]
   56     56   
version = "0.2.5"
   57     57   
features = ["no-env-filter"]
   58     58   
[features]
   59     59   
test-util = ["aws-smithy-runtime/test-util"]
   60     60   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   61     61   
behavior-version-latest = []
   62     62   
rustls = ["aws-smithy-runtime/tls-rustls"]
          63  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   63     64   
gated-tests = []
   64         -
default = ["rt-tokio", "rustls"]
          65  +
default = ["rt-tokio", "rustls", "default-https-client"]
   65     66   
   66     67   

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output.rs

@@ -207,207 +267,267 @@
  227    227   
  228    228   
#[allow(unreachable_code, unused_variables)]
  229    229   
#[cfg(test)]
  230    230   
mod empty_input_and_empty_output_test {
  231    231   
  232    232   
    /// Empty input serializes no extra query params
  233    233   
    /// Test ID: Ec2QueryEmptyInputAndEmptyOutput
  234    234   
    #[::tokio::test]
  235    235   
    #[::tracing_test::traced_test]
  236    236   
    async fn ec2_query_empty_input_and_empty_output_request() {
  237         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         237  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  238    238   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  239    239   
  240    240   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  241    241   
        let result = client.empty_input_and_empty_output().send().await;
  242    242   
        let _ = dbg!(result);
  243    243   
        let http_request = request_receiver.expect_request();
  244    244   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  245    245   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  246    246   
        let body = http_request.body().bytes().expect("body should be strict");
  247    247   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_operation.rs

@@ -207,207 +267,267 @@
  227    227   
#[allow(unreachable_code, unused_variables)]
  228    228   
#[cfg(test)]
  229    229   
mod endpoint_operation_test {
  230    230   
  231    231   
    /// Operations can prepend to the given host if they define the
  232    232   
    /// endpoint trait.
  233    233   
    /// Test ID: Ec2QueryEndpointTrait
  234    234   
    #[::tokio::test]
  235    235   
    #[::tracing_test::traced_test]
  236    236   
    async fn ec2_query_endpoint_trait_request() {
  237         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         237  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  238    238   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  239    239   
  240    240   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  241    241   
        let result = client.endpoint_operation().send().await;
  242    242   
        let _ = dbg!(result);
  243    243   
        let http_request = request_receiver.expect_request();
  244    244   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  245    245   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  246    246   
        let body = http_request.body().bytes().expect("body should be strict");
  247    247   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_with_host_label_operation.rs

@@ -229,229 +289,289 @@
  249    249   
#[cfg(test)]
  250    250   
mod endpoint_with_host_label_operation_test {
  251    251   
  252    252   
    /// Operations can prepend to the given host if they define the
  253    253   
    /// endpoint trait, and can use the host label trait to define
  254    254   
    /// further customization based on user input.
  255    255   
    /// Test ID: Ec2QueryEndpointTraitWithHostLabel
  256    256   
    #[::tokio::test]
  257    257   
    #[::tracing_test::traced_test]
  258    258   
    async fn ec2_query_endpoint_trait_with_host_label_request() {
  259         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         259  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  260    260   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  261    261   
  262    262   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  263    263   
        let result = client
  264    264   
            .endpoint_with_host_label_operation()
  265    265   
            .set_label(::std::option::Option::Some("bar".to_owned()))
  266    266   
            .send()
  267    267   
            .await;
  268    268   
        let _ = dbg!(result);
  269    269   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/host_with_path_operation.rs

@@ -201,201 +261,261 @@
  221    221   
  222    222   
#[allow(unreachable_code, unused_variables)]
  223    223   
#[cfg(test)]
  224    224   
mod host_with_path_operation_test {
  225    225   
  226    226   
    /// Custom endpoints supplied by users can have paths
  227    227   
    /// Test ID: Ec2QueryHostWithPath
  228    228   
    #[::tokio::test]
  229    229   
    #[::tracing_test::traced_test]
  230    230   
    async fn ec2_query_host_with_path_request() {
  231         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         231  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  232    232   
        let config_builder = crate::config::Config::builder()
  233    233   
            .with_test_defaults()
  234    234   
            .endpoint_url("https://example.com/custom");
  235    235   
  236    236   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  237    237   
        let result = client.host_with_path_operation().send().await;
  238    238   
        let _ = dbg!(result);
  239    239   
        let http_request = request_receiver.expect_request();
  240    240   
        let body = http_request.body().bytes().expect("body should be strict");
  241    241   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/nested_structures.rs

@@ -204,204 +264,264 @@
  224    224   
  225    225   
#[allow(unreachable_code, unused_variables)]
  226    226   
#[cfg(test)]
  227    227   
mod nested_structures_test {
  228    228   
  229    229   
    /// Serializes nested structures using dots
  230    230   
    /// Test ID: Ec2NestedStructures
  231    231   
    #[::tokio::test]
  232    232   
    #[::tracing_test::traced_test]
  233    233   
    async fn ec2_nested_structures_request() {
  234         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         234  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  235    235   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  236    236   
  237    237   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  238    238   
        let result = client
  239    239   
            .nested_structures()
  240    240   
            .set_nested(::std::option::Option::Some(
  241    241   
                crate::types::StructArg::builder()
  242    242   
                    .set_string_arg(::std::option::Option::Some("foo".to_owned()))
  243    243   
                    .set_other_arg(::std::option::Option::Some(true))
  244    244   
                    .set_recursive_arg(::std::option::Option::Some(::std::boxed::Box::new(

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/no_input_and_output.rs

@@ -201,201 +261,261 @@
  221    221   
  222    222   
#[allow(unreachable_code, unused_variables)]
  223    223   
#[cfg(test)]
  224    224   
mod no_input_and_output_test {
  225    225   
  226    226   
    /// No input serializes no payload
  227    227   
    /// Test ID: Ec2QueryNoInputAndOutput
  228    228   
    #[::tokio::test]
  229    229   
    #[::tracing_test::traced_test]
  230    230   
    async fn ec2_query_no_input_and_output_request() {
  231         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         231  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  232    232   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  233    233   
  234    234   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  235    235   
        let result = client.no_input_and_output().send().await;
  236    236   
        let _ = dbg!(result);
  237    237   
        let http_request = request_receiver.expect_request();
  238    238   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  239    239   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  240    240   
        let body = http_request.body().bytes().expect("body should be strict");
  241    241   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/put_with_content_encoding.rs

@@ -212,212 +300,300 @@
  232    232   
  233    233   
#[allow(unreachable_code, unused_variables)]
  234    234   
#[cfg(test)]
  235    235   
mod put_with_content_encoding_test {
  236    236   
  237    237   
    /// Compression algorithm encoding is appended to the Content-Encoding header.
  238    238   
    /// Test ID: SDKAppliedContentEncoding_ec2Query
  239    239   
    #[::tokio::test]
  240    240   
    #[::tracing_test::traced_test]
  241    241   
    async fn sdk_applied_content_encoding_ec2_query_request() {
  242         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         242  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  243    243   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  244    244   
  245    245   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  246    246   
        let result = client.put_with_content_encoding()
  247    247   
        .set_data(
  248    248   
            ::std::option::Option::Some(
  249    249   
                "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68CrTmbcecjFcxHkgsqdix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D57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n".to_owned()
  250    250   
            )
  251    251   
        )
  252    252   
        .send().await;
  253    253   
        let _ = dbg!(result);
  254    254   
        let http_request = request_receiver.expect_request();
  255    255   
        let expected_headers = [("Content-Encoding", "gzip")];
  256    256   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  257    257   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  258    258   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  259    259   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  260    260   
    }
  261    261   
  262    262   
    /// Compression algorithm encoding is appended to the Content-Encoding header, and the
  263    263   
    /// user-provided content-encoding is NOT in the Content-Encoding header since HTTP binding
  264    264   
    /// traits are ignored in the ec2Query protocol.
  265    265   
    ///
  266    266   
    /// Test ID: SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query
  267    267   
    #[::tokio::test]
  268    268   
    #[::tracing_test::traced_test]
  269    269   
    async fn sdk_appends_gzip_and_ignores_http_provided_encoding_ec2_query_request() {
  270         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         270  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  271    271   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  272    272   
  273    273   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  274    274   
        let result = client.put_with_content_encoding()
  275    275   
        .set_encoding(
  276    276   
            ::std::option::Option::Some(
  277    277   
                "custom".to_owned()
  278    278   
            )
  279    279   
        )
  280    280   
        .set_data(

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_idempotency_token_auto_fill.rs

@@ -220,220 +307,307 @@
  240    240   
  241    241   
#[allow(unreachable_code, unused_variables)]
  242    242   
#[cfg(test)]
  243    243   
mod query_idempotency_token_auto_fill_test {
  244    244   
  245    245   
    /// Automatically adds idempotency token when not set
  246    246   
    /// Test ID: Ec2ProtocolIdempotencyTokenAutoFill
  247    247   
    #[::tokio::test]
  248    248   
    #[::tracing_test::traced_test]
  249    249   
    async fn ec2_protocol_idempotency_token_auto_fill_request() {
  250         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         250  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  251    251   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  252    252   
  253    253   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  254    254   
        let result = client.query_idempotency_token_auto_fill().send().await;
  255    255   
        let _ = dbg!(result);
  256    256   
        let http_request = request_receiver.expect_request();
  257    257   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  258    258   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  259    259   
        let required_headers = &["Content-Length"];
  260    260   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  261    261   
        let body = http_request.body().bytes().expect("body should be strict");
  262    262   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  263    263   
            body,
  264    264   
            "Action=QueryIdempotencyTokenAutoFill&Version=2020-01-08&Token=00000000-0000-4000-8000-000000000000",
  265    265   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  266    266   
        ));
  267    267   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  268    268   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  269    269   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  270    270   
    }
  271    271   
  272    272   
    /// Uses the given idempotency token as-is
  273    273   
    /// Test ID: Ec2ProtocolIdempotencyTokenAutoFillIsSet
  274    274   
    #[::tokio::test]
  275    275   
    #[::tracing_test::traced_test]
  276    276   
    async fn ec2_protocol_idempotency_token_auto_fill_is_set_request() {
  277         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         277  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  278    278   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  279    279   
  280    280   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  281    281   
        let result = client
  282    282   
            .query_idempotency_token_auto_fill()
  283    283   
            .set_token(::std::option::Option::Some("00000000-0000-4000-8000-000000000123".to_owned()))
  284    284   
            .send()
  285    285   
            .await;
  286    286   
        let _ = dbg!(result);
  287    287   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_lists.rs

@@ -197,197 +377,377 @@
  217    217   
  218    218   
#[allow(unreachable_code, unused_variables)]
  219    219   
#[cfg(test)]
  220    220   
mod query_lists_test {
  221    221   
  222    222   
    /// Serializes query lists. All EC2 lists are flattened.
  223    223   
    /// Test ID: Ec2Lists
  224    224   
    #[::tokio::test]
  225    225   
    #[::tracing_test::traced_test]
  226    226   
    async fn ec2_lists_request() {
  227         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         227  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  228    228   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  229    229   
  230    230   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  231    231   
        let result = client
  232    232   
            .query_lists()
  233    233   
            .set_list_arg(::std::option::Option::Some(vec!["foo".to_owned(), "bar".to_owned(), "baz".to_owned()]))
  234    234   
            .set_complex_list_arg(::std::option::Option::Some(vec![
  235    235   
                crate::types::GreetingStruct::builder()
  236    236   
                    .set_hi(::std::option::Option::Some("hello".to_owned()))
  237    237   
                    .build(),
  238    238   
                crate::types::GreetingStruct::builder()
  239    239   
                    .set_hi(::std::option::Option::Some("hola".to_owned()))
  240    240   
                    .build(),
  241    241   
            ]))
  242    242   
            .send()
  243    243   
            .await;
  244    244   
        let _ = dbg!(result);
  245    245   
        let http_request = request_receiver.expect_request();
  246    246   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  247    247   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  248    248   
        let body = http_request.body().bytes().expect("body should be strict");
  249    249   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  250    250   
            body,
  251    251   
            "Action=QueryLists&Version=2020-01-08&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&ComplexListArg.1.Hi=hello&ComplexListArg.2.Hi=hola",
  252    252   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  253    253   
        ));
  254    254   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  255    255   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  256    256   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  257    257   
    }
  258    258   
  259    259   
    /// Does not serialize empty query lists.
  260    260   
    /// Test ID: Ec2EmptyQueryLists
  261    261   
    #[::tokio::test]
  262    262   
    #[::tracing_test::traced_test]
  263    263   
    async fn ec2_empty_query_lists_request() {
  264         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         264  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  265    265   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  266    266   
  267    267   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  268    268   
        let result = client.query_lists().set_list_arg(::std::option::Option::Some(vec![])).send().await;
  269    269   
        let _ = dbg!(result);
  270    270   
        let http_request = request_receiver.expect_request();
  271    271   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  272    272   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  273    273   
        let body = http_request.body().bytes().expect("body should be strict");
  274    274   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  275    275   
            body,
  276    276   
            "Action=QueryLists&Version=2020-01-08",
  277    277   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  278    278   
        ));
  279    279   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  280    280   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  281    281   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  282    282   
    }
  283    283   
  284    284   
    /// An xmlName trait in the member of a list has no effect on the list serialization.
  285    285   
    /// Test ID: Ec2ListArgWithXmlNameMember
  286    286   
    #[::tokio::test]
  287    287   
    #[::tracing_test::traced_test]
  288    288   
    async fn ec2_list_arg_with_xml_name_member_request() {
  289         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         289  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  290    290   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  291    291   
  292    292   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  293    293   
        let result = client
  294    294   
            .query_lists()
  295    295   
            .set_list_arg_with_xml_name_member(::std::option::Option::Some(vec!["A".to_owned(), "B".to_owned()]))
  296    296   
            .send()
  297    297   
            .await;
  298    298   
        let _ = dbg!(result);
  299    299   
        let http_request = request_receiver.expect_request();
  300    300   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  301    301   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  302    302   
        let body = http_request.body().bytes().expect("body should be strict");
  303    303   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  304    304   
            body,
  305    305   
            "Action=QueryLists&Version=2020-01-08&ListArgWithXmlNameMember.1=A&ListArgWithXmlNameMember.2=B",
  306    306   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  307    307   
        ));
  308    308   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  309    309   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  310    310   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  311    311   
    }
  312    312   
  313    313   
    /// Changes the name of the list using the xmlName trait
  314    314   
    /// Test ID: Ec2ListMemberWithXmlName
  315    315   
    #[::tokio::test]
  316    316   
    #[::tracing_test::traced_test]
  317    317   
    async fn ec2_list_member_with_xml_name_request() {
  318         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         318  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  319    319   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  320    320   
  321    321   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  322    322   
        let result = client
  323    323   
            .query_lists()
  324    324   
            .set_list_arg_with_xml_name(::std::option::Option::Some(vec!["A".to_owned(), "B".to_owned()]))
  325    325   
            .send()
  326    326   
            .await;
  327    327   
        let _ = dbg!(result);
  328    328   
        let http_request = request_receiver.expect_request();
  329    329   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  330    330   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  331    331   
        let body = http_request.body().bytes().expect("body should be strict");
  332    332   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  333    333   
            body,
  334    334   
            "Action=QueryLists&Version=2020-01-08&Hi.1=A&Hi.2=B",
  335    335   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  336    336   
        ));
  337    337   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  338    338   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  339    339   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  340    340   
    }
  341    341   
  342    342   
    /// Nested structure with a list member
  343    343   
    /// Test ID: Ec2ListNestedStructWithList
  344    344   
    #[::tokio::test]
  345    345   
    #[::tracing_test::traced_test]
  346    346   
    async fn ec2_list_nested_struct_with_list_request() {
  347         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         347  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  348    348   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  349    349   
  350    350   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  351    351   
        let result = client
  352    352   
            .query_lists()
  353    353   
            .set_nested_with_list(::std::option::Option::Some(
  354    354   
                crate::types::NestedStructWithList::builder()
  355    355   
                    .set_list_arg(::std::option::Option::Some(vec!["A".to_owned(), "B".to_owned()]))
  356    356   
                    .build(),
  357    357   
            ))

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_timestamps.rs

@@ -203,203 +263,263 @@
  223    223   
  224    224   
#[allow(unreachable_code, unused_variables)]
  225    225   
#[cfg(test)]
  226    226   
mod query_timestamps_test {
  227    227   
  228    228   
    /// Serializes timestamps
  229    229   
    /// Test ID: Ec2TimestampsInput
  230    230   
    #[::tokio::test]
  231    231   
    #[::tracing_test::traced_test]
  232    232   
    async fn ec2_timestamps_input_request() {
  233         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         233  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  234    234   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  235    235   
  236    236   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  237    237   
        let result = client
  238    238   
            .query_timestamps()
  239    239   
            .set_normal_format(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  240    240   
                1422172800, 0_f64,
  241    241   
            )))
  242    242   
            .set_epoch_member(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  243    243   
                1422172800, 0_f64,

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/simple_input_params.rs

@@ -204,204 +638,638 @@
  224    224   
  225    225   
#[allow(unreachable_code, unused_variables)]
  226    226   
#[cfg(test)]
  227    227   
mod simple_input_params_test {
  228    228   
  229    229   
    /// Serializes strings
  230    230   
    /// Test ID: Ec2SimpleInputParamsStrings
  231    231   
    #[::tokio::test]
  232    232   
    #[::tracing_test::traced_test]
  233    233   
    async fn ec2_simple_input_params_strings_request() {
  234         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         234  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  235    235   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  236    236   
  237    237   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  238    238   
        let result = client
  239    239   
            .simple_input_params()
  240    240   
            .set_foo(::std::option::Option::Some("val1".to_owned()))
  241    241   
            .set_bar(::std::option::Option::Some("val2".to_owned()))
  242    242   
            .send()
  243    243   
            .await;
  244    244   
        let _ = dbg!(result);
  245    245   
        let http_request = request_receiver.expect_request();
  246    246   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  247    247   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  248    248   
        let required_headers = &["Content-Length"];
  249    249   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  250    250   
        let body = http_request.body().bytes().expect("body should be strict");
  251    251   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  252    252   
            body,
  253    253   
            "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Bar=val2",
  254    254   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  255    255   
        ));
  256    256   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  257    257   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  258    258   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  259    259   
    }
  260    260   
  261    261   
    /// Serializes booleans that are true
  262    262   
    /// Test ID: Ec2SimpleInputParamsStringAndBooleanTrue
  263    263   
    #[::tokio::test]
  264    264   
    #[::tracing_test::traced_test]
  265    265   
    async fn ec2_simple_input_params_string_and_boolean_true_request() {
  266         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         266  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  267    267   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  268    268   
  269    269   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  270    270   
        let result = client
  271    271   
            .simple_input_params()
  272    272   
            .set_foo(::std::option::Option::Some("val1".to_owned()))
  273    273   
            .set_baz(::std::option::Option::Some(true))
  274    274   
            .send()
  275    275   
            .await;
  276    276   
        let _ = dbg!(result);
  277    277   
        let http_request = request_receiver.expect_request();
  278    278   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  279    279   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  280    280   
        let required_headers = &["Content-Length"];
  281    281   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  282    282   
        let body = http_request.body().bytes().expect("body should be strict");
  283    283   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  284    284   
            body,
  285    285   
            "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Baz=true",
  286    286   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  287    287   
        ));
  288    288   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  289    289   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  290    290   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  291    291   
    }
  292    292   
  293    293   
    /// Serializes booleans that are false
  294    294   
    /// Test ID: Ec2SimpleInputParamsStringsAndBooleanFalse
  295    295   
    #[::tokio::test]
  296    296   
    #[::tracing_test::traced_test]
  297    297   
    async fn ec2_simple_input_params_strings_and_boolean_false_request() {
  298         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         298  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  299    299   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  300    300   
  301    301   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  302    302   
        let result = client.simple_input_params().set_baz(::std::option::Option::Some(false)).send().await;
  303    303   
        let _ = dbg!(result);
  304    304   
        let http_request = request_receiver.expect_request();
  305    305   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  306    306   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  307    307   
        let required_headers = &["Content-Length"];
  308    308   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  309    309   
        let body = http_request.body().bytes().expect("body should be strict");
  310    310   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  311    311   
            body,
  312    312   
            "Action=SimpleInputParams&Version=2020-01-08&Baz=false",
  313    313   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  314    314   
        ));
  315    315   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  316    316   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  317    317   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  318    318   
    }
  319    319   
  320    320   
    /// Serializes integers
  321    321   
    /// Test ID: Ec2SimpleInputParamsInteger
  322    322   
    #[::tokio::test]
  323    323   
    #[::tracing_test::traced_test]
  324    324   
    async fn ec2_simple_input_params_integer_request() {
  325         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         325  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  326    326   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  327    327   
  328    328   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  329    329   
        let result = client.simple_input_params().set_bam(::std::option::Option::Some(10)).send().await;
  330    330   
        let _ = dbg!(result);
  331    331   
        let http_request = request_receiver.expect_request();
  332    332   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  333    333   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  334    334   
        let required_headers = &["Content-Length"];
  335    335   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  336    336   
        let body = http_request.body().bytes().expect("body should be strict");
  337    337   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  338    338   
            body,
  339    339   
            "Action=SimpleInputParams&Version=2020-01-08&Bam=10",
  340    340   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  341    341   
        ));
  342    342   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  343    343   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  344    344   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  345    345   
    }
  346    346   
  347    347   
    /// Serializes floats
  348    348   
    /// Test ID: Ec2SimpleInputParamsFloat
  349    349   
    #[::tokio::test]
  350    350   
    #[::tracing_test::traced_test]
  351    351   
    async fn ec2_simple_input_params_float_request() {
  352         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         352  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  353    353   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  354    354   
  355    355   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  356    356   
        let result = client.simple_input_params().set_boo(::std::option::Option::Some(10.8_f64)).send().await;
  357    357   
        let _ = dbg!(result);
  358    358   
        let http_request = request_receiver.expect_request();
  359    359   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  360    360   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  361    361   
        let required_headers = &["Content-Length"];
  362    362   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  363    363   
        let body = http_request.body().bytes().expect("body should be strict");
  364    364   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  365    365   
            body,
  366    366   
            "Action=SimpleInputParams&Version=2020-01-08&Boo=10.8",
  367    367   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  368    368   
        ));
  369    369   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  370    370   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  371    371   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  372    372   
    }
  373    373   
  374    374   
    /// Blobs are base64 encoded in the query string
  375    375   
    /// Test ID: Ec2SimpleInputParamsBlob
  376    376   
    #[::tokio::test]
  377    377   
    #[::tracing_test::traced_test]
  378    378   
    async fn ec2_simple_input_params_blob_request() {
  379         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         379  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  380    380   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  381    381   
  382    382   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  383    383   
        let result = client
  384    384   
            .simple_input_params()
  385    385   
            .set_qux(::std::option::Option::Some(::aws_smithy_types::Blob::new("value")))
  386    386   
            .send()
  387    387   
            .await;
  388    388   
        let _ = dbg!(result);
  389    389   
        let http_request = request_receiver.expect_request();
  390    390   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  391    391   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  392    392   
        let required_headers = &["Content-Length"];
  393    393   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  394    394   
        let body = http_request.body().bytes().expect("body should be strict");
  395    395   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  396    396   
            body,
  397    397   
            "Action=SimpleInputParams&Version=2020-01-08&Qux=dmFsdWU%3D",
  398    398   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  399    399   
        ));
  400    400   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  401    401   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  402    402   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  403    403   
    }
  404    404   
  405    405   
    /// Serializes enums in the query string
  406    406   
    /// Test ID: Ec2Enums
  407    407   
    #[::tokio::test]
  408    408   
    #[::tracing_test::traced_test]
  409    409   
    async fn ec2_enums_request() {
  410         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         410  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  411    411   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  412    412   
  413    413   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  414    414   
        let result = client
  415    415   
            .simple_input_params()
  416    416   
            .set_foo_enum(::std::option::Option::Some(
  417    417   
                "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
  418    418   
            ))
  419    419   
            .send()
  420    420   
            .await;
  421    421   
        let _ = dbg!(result);
  422    422   
        let http_request = request_receiver.expect_request();
  423    423   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  424    424   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  425    425   
        let required_headers = &["Content-Length"];
  426    426   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  427    427   
        let body = http_request.body().bytes().expect("body should be strict");
  428    428   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  429    429   
            body,
  430    430   
            "Action=SimpleInputParams&Version=2020-01-08&FooEnum=Foo",
  431    431   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  432    432   
        ));
  433    433   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  434    434   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  435    435   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  436    436   
    }
  437    437   
  438    438   
    /// Serializes query using ec2QueryName trait.
  439    439   
    /// Test ID: Ec2Query
  440    440   
    #[::tokio::test]
  441    441   
    #[::tracing_test::traced_test]
  442    442   
    async fn ec2_query_request() {
  443         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         443  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  444    444   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  445    445   
  446    446   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  447    447   
        let result = client
  448    448   
            .simple_input_params()
  449    449   
            .set_has_query_name(::std::option::Option::Some("Hi".to_owned()))
  450    450   
            .send()
  451    451   
            .await;
  452    452   
        let _ = dbg!(result);
  453    453   
        let http_request = request_receiver.expect_request();
  454    454   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  455    455   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  456    456   
        let required_headers = &["Content-Length"];
  457    457   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  458    458   
        let body = http_request.body().bytes().expect("body should be strict");
  459    459   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  460    460   
            body,
  461    461   
            "Action=SimpleInputParams&Version=2020-01-08&HasQueryName=Hi",
  462    462   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  463    463   
        ));
  464    464   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  465    465   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  466    466   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  467    467   
    }
  468    468   
  469    469   
    /// ec2QueryName trait is preferred over xmlName.
  470    470   
    /// Test ID: Ec2QueryIsPreferred
  471    471   
    #[::tokio::test]
  472    472   
    #[::tracing_test::traced_test]
  473    473   
    async fn ec2_query_is_preferred_request() {
  474         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         474  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  475    475   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  476    476   
  477    477   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  478    478   
        let result = client
  479    479   
            .simple_input_params()
  480    480   
            .set_has_query_and_xml_name(::std::option::Option::Some("Hi".to_owned()))
  481    481   
            .send()
  482    482   
            .await;
  483    483   
        let _ = dbg!(result);
  484    484   
        let http_request = request_receiver.expect_request();
  485    485   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  486    486   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  487    487   
        let required_headers = &["Content-Length"];
  488    488   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  489    489   
        let body = http_request.body().bytes().expect("body should be strict");
  490    490   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  491    491   
            body,
  492    492   
            "Action=SimpleInputParams&Version=2020-01-08&HasQueryAndXmlName=Hi",
  493    493   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  494    494   
        ));
  495    495   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  496    496   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  497    497   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  498    498   
    }
  499    499   
  500    500   
    /// xmlName is used with the ec2 protocol, but the first character is uppercased
  501    501   
    /// Test ID: Ec2XmlNameIsUppercased
  502    502   
    #[::tokio::test]
  503    503   
    #[::tracing_test::traced_test]
  504    504   
    async fn ec2_xml_name_is_uppercased_request() {
  505         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         505  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  506    506   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  507    507   
  508    508   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  509    509   
        let result = client
  510    510   
            .simple_input_params()
  511    511   
            .set_uses_xml_name(::std::option::Option::Some("Hi".to_owned()))
  512    512   
            .send()
  513    513   
            .await;
  514    514   
        let _ = dbg!(result);
  515    515   
        let http_request = request_receiver.expect_request();
  516    516   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  517    517   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  518    518   
        let required_headers = &["Content-Length"];
  519    519   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  520    520   
        let body = http_request.body().bytes().expect("body should be strict");
  521    521   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  522    522   
            body,
  523    523   
            "Action=SimpleInputParams&Version=2020-01-08&UsesXmlName=Hi",
  524    524   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  525    525   
        ));
  526    526   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  527    527   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  528    528   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  529    529   
    }
  530    530   
  531    531   
    /// Supports handling NaN float values.
  532    532   
    /// Test ID: Ec2QuerySupportsNaNFloatInputs
  533    533   
    #[::tokio::test]
  534    534   
    #[::tracing_test::traced_test]
  535    535   
    async fn ec2_query_supports_na_n_float_inputs_request() {
  536         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         536  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  537    537   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  538    538   
  539    539   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  540    540   
        let result = client
  541    541   
            .simple_input_params()
  542    542   
            .set_float_value(::std::option::Option::Some(
  543    543   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  544    544   
            ))
  545    545   
            .set_boo(::std::option::Option::Some(
  546    546   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  547    547   
            ))
  548    548   
            .send()
  549    549   
            .await;
  550    550   
        let _ = dbg!(result);
  551    551   
        let http_request = request_receiver.expect_request();
  552    552   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  553    553   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  554    554   
        let required_headers = &["Content-Length"];
  555    555   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  556    556   
        let body = http_request.body().bytes().expect("body should be strict");
  557    557   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  558    558   
            body,
  559    559   
            "Action=SimpleInputParams&Version=2020-01-08&FloatValue=NaN&Boo=NaN",
  560    560   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  561    561   
        ));
  562    562   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  563    563   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  564    564   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  565    565   
    }
  566    566   
  567    567   
    /// Supports handling Infinity float values.
  568    568   
    /// Test ID: Ec2QuerySupportsInfinityFloatInputs
  569    569   
    #[::tokio::test]
  570    570   
    #[::tracing_test::traced_test]
  571    571   
    async fn ec2_query_supports_infinity_float_inputs_request() {
  572         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         572  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  573    573   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  574    574   
  575    575   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  576    576   
        let result = client
  577    577   
            .simple_input_params()
  578    578   
            .set_float_value(::std::option::Option::Some(
  579    579   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  580    580   
            ))
  581    581   
            .set_boo(::std::option::Option::Some(
  582    582   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  583    583   
            ))
  584    584   
            .send()
  585    585   
            .await;
  586    586   
        let _ = dbg!(result);
  587    587   
        let http_request = request_receiver.expect_request();
  588    588   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  589    589   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  590    590   
        let required_headers = &["Content-Length"];
  591    591   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  592    592   
        let body = http_request.body().bytes().expect("body should be strict");
  593    593   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  594    594   
            body,
  595    595   
            "Action=SimpleInputParams&Version=2020-01-08&FloatValue=Infinity&Boo=Infinity",
  596    596   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  597    597   
        ));
  598    598   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  599    599   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  600    600   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  601    601   
    }
  602    602   
  603    603   
    /// Supports handling -Infinity float values.
  604    604   
    /// Test ID: Ec2QuerySupportsNegativeInfinityFloatInputs
  605    605   
    #[::tokio::test]
  606    606   
    #[::tracing_test::traced_test]
  607    607   
    async fn ec2_query_supports_negative_infinity_float_inputs_request() {
  608         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         608  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  609    609   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  610    610   
  611    611   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  612    612   
        let result = client
  613    613   
            .simple_input_params()
  614    614   
            .set_float_value(::std::option::Option::Some(
  615    615   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  616    616   
            ))
  617    617   
            .set_boo(::std::option::Option::Some(
  618    618   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),

tmp-codegen-diff/codegen-client-test/endpoint-rules/rust-client-codegen/Cargo.toml

@@ -4,4 +37,38 @@
   24     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
   25     25   
[dependencies.bytes]
   26     26   
version = "1.4.0"
   27     27   
[dependencies.http]
   28     28   
version = "0.2.9"
   29     29   
[features]
   30     30   
test-util = ["aws-smithy-runtime/test-util"]
   31     31   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   32     32   
behavior-version-latest = []
   33     33   
rustls = ["aws-smithy-runtime/tls-rustls"]
          34  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   34     35   
gated-tests = []
   35         -
default = ["rt-tokio", "rustls"]
          36  +
default = ["rt-tokio", "rustls", "default-https-client"]
   36     37   
   37     38   

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/Cargo.toml

@@ -9,9 +62,63 @@
   29     29   
[dependencies.bytes]
   30     30   
version = "1.4.0"
   31     31   
[dependencies.flate2]
   32     32   
version = "1.0.30"
   33     33   
[dependencies.http]
   34     34   
version = "0.2.9"
   35     35   
[dependencies.http-body]
   36     36   
version = "0.4.4"
   37     37   
[dependencies.tracing]
   38     38   
version = "0.1"
          39  +
[dev-dependencies.aws-smithy-http-client]
          40  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
          41  +
features = ["test-util"]
   39     42   
[dev-dependencies.aws-smithy-protocol-test]
   40     43   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   41         -
[dev-dependencies.aws-smithy-runtime]
   42         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   43         -
features = ["client", "test-util"]
   44     44   
[dev-dependencies.aws-smithy-types]
   45     45   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
   46     46   
[dev-dependencies.pretty_assertions]
   47     47   
version = "1.3.0"
   48     48   
[dev-dependencies.tokio]
   49     49   
version = "1.23.1"
   50     50   
features = ["macros", "test-util", "rt-multi-thread"]
   51     51   
[dev-dependencies.tracing-test]
   52     52   
version = "0.2.5"
   53     53   
features = ["no-env-filter"]
   54     54   
[features]
   55     55   
test-util = ["aws-smithy-runtime/test-util"]
   56     56   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   57     57   
behavior-version-latest = []
   58     58   
rustls = ["aws-smithy-runtime/tls-rustls"]
          59  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   59     60   
gated-tests = []
   60         -
default = ["rt-tokio", "rustls"]
          61  +
default = ["rt-tokio", "rustls", "default-https-client"]
   61     62   
   62     63