Client Test

Client Test

rev. 3d2cf9bfcccf2cb5e5660fe2685c9174956bfcad

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/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: RestXmlEndpointTraitWithHostLabel
  256    256   
    #[::tokio::test]
  257    257   
    #[::tracing_test::traced_test]
  258    258   
    async fn rest_xml_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/rest_xml/rust-client-codegen/src/operation/flattened_xml_map.rs

@@ -202,202 +262,262 @@
  222    222   
  223    223   
#[allow(unreachable_code, unused_variables)]
  224    224   
#[cfg(test)]
  225    225   
mod flattened_xml_map_test {
  226    226   
  227    227   
    /// Serializes flattened XML maps in requests
  228    228   
    /// Test ID: FlattenedXmlMap
  229    229   
    #[::tokio::test]
  230    230   
    #[::tracing_test::traced_test]
  231    231   
    async fn flattened_xml_map_request() {
  232         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         232  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  233    233   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  234    234   
  235    235   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  236    236   
        let result = client
  237    237   
            .flattened_xml_map()
  238    238   
            .set_my_map(::std::option::Option::Some({
  239    239   
                let mut ret = ::std::collections::HashMap::new();
  240    240   
                ret.insert(
  241    241   
                    "foo".to_owned(),
  242    242   
                    "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/flattened_xml_map_with_xml_name.rs

@@ -210,210 +270,270 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod flattened_xml_map_with_xml_name_test {
  234    234   
  235    235   
    /// Serializes flattened XML maps in requests that have xmlName on members
  236    236   
    /// Test ID: FlattenedXmlMapWithXmlName
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn flattened_xml_map_with_xml_name_request() {
  240         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         240  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  241    241   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  242    242   
  243    243   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    244   
        let result = client
  245    245   
            .flattened_xml_map_with_xml_name()
  246    246   
            .set_my_map(::std::option::Option::Some({
  247    247   
                let mut ret = ::std::collections::HashMap::new();
  248    248   
                ret.insert("a".to_owned(), "A".to_owned());
  249    249   
                ret.insert("b".to_owned(), "B".to_owned());
  250    250   
                ret

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_enum_payload.rs

@@ -203,203 +263,263 @@
  223    223   
// operationContextParams trait. They target the operation's input shape.
  224    224   
  225    225   
#[allow(unreachable_code, unused_variables)]
  226    226   
#[cfg(test)]
  227    227   
mod http_enum_payload_test {
  228    228   
  229    229   
    /// Test ID: RestXmlEnumPayloadRequest
  230    230   
    #[::tokio::test]
  231    231   
    #[::tracing_test::traced_test]
  232    232   
    async fn rest_xml_enum_payload_request_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   
            .http_enum_payload()
  239    239   
            .set_payload(::std::option::Option::Some(
  240    240   
                "enumvalue".parse::<crate::types::StringEnum>().expect("static value validated to member"),
  241    241   
            ))
  242    242   
            .send()
  243    243   
            .await;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_traits.rs

@@ -204,204 +296,296 @@
  224    224   
  225    225   
#[allow(unreachable_code, unused_variables)]
  226    226   
#[cfg(test)]
  227    227   
mod http_payload_traits_test {
  228    228   
  229    229   
    /// Serializes a blob in the HTTP payload
  230    230   
    /// Test ID: HttpPayloadTraitsWithBlob
  231    231   
    #[::tokio::test]
  232    232   
    #[::tracing_test::traced_test]
  233    233   
    async fn http_payload_traits_with_blob_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   
            .http_payload_traits()
  240    240   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  241    241   
            .set_blob(::std::option::Option::Some(::aws_smithy_types::Blob::new("blobby blob blob")))
  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 = [("X-Foo", "Foo")];
  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   
            "blobby blob blob",
  254    254   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  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(), "/HttpPayloadTraits", "path was incorrect");
  259    259   
    }
  260    260   
  261    261   
    /// Serializes an empty blob in the HTTP payload
  262    262   
    /// Test ID: HttpPayloadTraitsWithNoBlobBody
  263    263   
    #[::tokio::test]
  264    264   
    #[::tracing_test::traced_test]
  265    265   
    async fn http_payload_traits_with_no_blob_body_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   
            .http_payload_traits()
  272    272   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  273    273   
            .send()
  274    274   
            .await;
  275    275   
        let _ = dbg!(result);
  276    276   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_traits_with_media_type.rs

@@ -215,215 +275,275 @@
  235    235   
  236    236   
#[allow(unreachable_code, unused_variables)]
  237    237   
#[cfg(test)]
  238    238   
mod http_payload_traits_with_media_type_test {
  239    239   
  240    240   
    /// Serializes a blob in the HTTP payload with a content-type
  241    241   
    /// Test ID: HttpPayloadTraitsWithMediaTypeWithBlob
  242    242   
    #[::tokio::test]
  243    243   
    #[::tracing_test::traced_test]
  244    244   
    async fn http_payload_traits_with_media_type_with_blob_request() {
  245         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         245  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  246    246   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  247    247   
  248    248   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  249    249   
        let result = client
  250    250   
            .http_payload_traits_with_media_type()
  251    251   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  252    252   
            .set_blob(::std::option::Option::Some(::aws_smithy_types::Blob::new("blobby blob blob")))
  253    253   
            .send()
  254    254   
            .await;
  255    255   
        let _ = dbg!(result);

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_member_xml_name.rs

@@ -210,210 +270,270 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod http_payload_with_member_xml_name_test {
  234    234   
  235    235   
    /// Serializes a structure in the payload using a wrapper name based on member xmlName
  236    236   
    /// Test ID: HttpPayloadWithMemberXmlName
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn http_payload_with_member_xml_name_request() {
  240         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         240  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  241    241   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  242    242   
  243    243   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    244   
        let result = client
  245    245   
            .http_payload_with_member_xml_name()
  246    246   
            .set_nested(::std::option::Option::Some(
  247    247   
                crate::types::PayloadWithXmlName::builder()
  248    248   
                    .set_name(::std::option::Option::Some("Phreddy".to_owned()))
  249    249   
                    .build(),
  250    250   
            ))

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_structure.rs

@@ -210,210 +270,270 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod http_payload_with_structure_test {
  234    234   
  235    235   
    /// Serializes a structure in the payload
  236    236   
    /// Test ID: HttpPayloadWithStructure
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn http_payload_with_structure_request() {
  240         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         240  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  241    241   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  242    242   
  243    243   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    244   
        let result = client
  245    245   
            .http_payload_with_structure()
  246    246   
            .set_nested(::std::option::Option::Some(
  247    247   
                crate::types::NestedPayload::builder()
  248    248   
                    .set_greeting(::std::option::Option::Some("hello".to_owned()))
  249    249   
                    .set_name(::std::option::Option::Some("Phreddy".to_owned()))
  250    250   
                    .build(),

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_union.rs

@@ -210,210 +301,301 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod http_payload_with_union_test {
  234    234   
  235    235   
    /// Serializes a union in the payload.
  236    236   
    /// Test ID: RestXmlHttpPayloadWithUnion
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn rest_xml_http_payload_with_union_request() {
  240         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         240  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  241    241   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  242    242   
  243    243   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    244   
        let result = client
  245    245   
            .http_payload_with_union()
  246    246   
            .set_nested(::std::option::Option::Some(crate::types::UnionPayload::Greeting("hello".to_owned())))
  247    247   
            .send()
  248    248   
            .await;
  249    249   
        let _ = dbg!(result);
  250    250   
        let http_request = request_receiver.expect_request();
  251    251   
        let expected_headers = [("Content-Type", "application/xml")];
  252    252   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  253    253   
        let required_headers = &["Content-Length"];
  254    254   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  255    255   
        let body = http_request.body().bytes().expect("body should be strict");
  256    256   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  257    257   
            body,
  258    258   
            "<UnionPayload>\n    <greeting>hello</greeting>\n</UnionPayload>",
  259    259   
            ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  260    260   
        ));
  261    261   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  262    262   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  263    263   
        ::pretty_assertions::assert_eq!(uri.path(), "/HttpPayloadWithUnion", "path was incorrect");
  264    264   
    }
  265    265   
  266    266   
    /// No payload is sent if the union has no value.
  267    267   
    /// Test ID: RestXmlHttpPayloadWithUnsetUnion
  268    268   
    #[::tokio::test]
  269    269   
    #[::tracing_test::traced_test]
  270    270   
    async fn rest_xml_http_payload_with_unset_union_request() {
  271         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         271  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  272    272   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  273    273   
  274    274   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  275    275   
        let result = client.http_payload_with_union().send().await;
  276    276   
        let _ = dbg!(result);
  277    277   
        let http_request = request_receiver.expect_request();
  278    278   
        let body = http_request.body().bytes().expect("body should be strict");
  279    279   
        // No body.
  280    280   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  281    281   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_name.rs

@@ -210,210 +270,270 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod http_payload_with_xml_name_test {
  234    234   
  235    235   
    /// Serializes a structure in the payload using a wrapper name based on xmlName
  236    236   
    /// Test ID: HttpPayloadWithXmlName
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn http_payload_with_xml_name_request() {
  240         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         240  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  241    241   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  242    242   
  243    243   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    244   
        let result = client
  245    245   
            .http_payload_with_xml_name()
  246    246   
            .set_nested(::std::option::Option::Some(
  247    247   
                crate::types::PayloadWithXmlName::builder()
  248    248   
                    .set_name(::std::option::Option::Some("Phreddy".to_owned()))
  249    249   
                    .build(),
  250    250   
            ))

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace.rs

@@ -210,210 +270,270 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod http_payload_with_xml_namespace_test {
  234    234   
  235    235   
    /// Serializes a structure in the payload using a wrapper with an XML namespace
  236    236   
    /// Test ID: HttpPayloadWithXmlNamespace
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn http_payload_with_xml_namespace_request() {
  240         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         240  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  241    241   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  242    242   
  243    243   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  244    244   
        let result = client
  245    245   
            .http_payload_with_xml_namespace()
  246    246   
            .set_nested(::std::option::Option::Some(
  247    247   
                crate::types::PayloadWithXmlNamespace::builder()
  248    248   
                    .set_name(::std::option::Option::Some("Phreddy".to_owned()))
  249    249   
                    .build(),
  250    250   
            ))

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace_and_prefix.rs

@@ -214,214 +274,274 @@
  234    234   
  235    235   
#[allow(unreachable_code, unused_variables)]
  236    236   
#[cfg(test)]
  237    237   
mod http_payload_with_xml_namespace_and_prefix_test {
  238    238   
  239    239   
    /// Serializes a structure in the payload using a wrapper with an XML namespace
  240    240   
    /// Test ID: HttpPayloadWithXmlNamespaceAndPrefix
  241    241   
    #[::tokio::test]
  242    242   
    #[::tracing_test::traced_test]
  243    243   
    async fn http_payload_with_xml_namespace_and_prefix_request() {
  244         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         244  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  245    245   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  246    246   
  247    247   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  248    248   
        let result = client
  249    249   
            .http_payload_with_xml_namespace_and_prefix()
  250    250   
            .set_nested(::std::option::Option::Some(
  251    251   
                crate::types::PayloadWithXmlNamespaceAndPrefix::builder()
  252    252   
                    .set_name(::std::option::Option::Some("Phreddy".to_owned()))
  253    253   
                    .build(),
  254    254   
            ))

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_prefix_headers.rs

@@ -199,199 +318,318 @@
  219    219   
  220    220   
#[allow(unreachable_code, unused_variables)]
  221    221   
#[cfg(test)]
  222    222   
mod http_prefix_headers_test {
  223    223   
  224    224   
    /// Adds headers by prefix
  225    225   
    /// Test ID: HttpPrefixHeadersArePresent
  226    226   
    #[::tokio::test]
  227    227   
    #[::tracing_test::traced_test]
  228    228   
    async fn http_prefix_headers_are_present_request() {
  229         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         229  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  230    230   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  231    231   
  232    232   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  233    233   
        let result = client
  234    234   
            .http_prefix_headers()
  235    235   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  236    236   
            .set_foo_map(::std::option::Option::Some({
  237    237   
                let mut ret = ::std::collections::HashMap::new();
  238    238   
                ret.insert("Abc".to_owned().to_ascii_lowercase(), "Abc value".to_owned());
  239    239   
                ret.insert("Def".to_owned().to_ascii_lowercase(), "Def value".to_owned());
  240    240   
                ret
  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 = [("X-Foo", "Foo"), ("X-Foo-Abc", "Abc value"), ("X-Foo-Def", "Def value")];
  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   
        // No body.
  250    250   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  251    251   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  252    252   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  253    253   
        ::pretty_assertions::assert_eq!(uri.path(), "/HttpPrefixHeaders", "path was incorrect");
  254    254   
    }
  255    255   
  256    256   
    /// No prefix headers are serialized because the value is not present
  257    257   
    /// Test ID: HttpPrefixHeadersAreNotPresent
  258    258   
    #[::tokio::test]
  259    259   
    #[::tracing_test::traced_test]
  260    260   
    async fn http_prefix_headers_are_not_present_request() {
  261         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         261  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  262    262   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  263    263   
  264    264   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  265    265   
        let result = client
  266    266   
            .http_prefix_headers()
  267    267   
            .set_foo(::std::option::Option::Some("Foo".to_owned()))
  268    268   
            .set_foo_map(::std::option::Option::Some(::std::collections::HashMap::new()))
  269    269   
            .send()
  270    270   
            .await;
  271    271   
        let _ = dbg!(result);
  272    272   
        let http_request = request_receiver.expect_request();
  273    273   
        let expected_headers = [("X-Foo", "Foo")];
  274    274   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  275    275   
        let body = http_request.body().bytes().expect("body should be strict");
  276    276   
        // No body.
  277    277   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  278    278   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  279    279   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  280    280   
        ::pretty_assertions::assert_eq!(uri.path(), "/HttpPrefixHeaders", "path was incorrect");
  281    281   
    }
  282    282   
  283    283   
    /// Serialize prefix headers were the value is present but empty
  284    284   
    /// Test ID: HttpPrefixEmptyHeaders
  285    285   
    #[::tokio::test]
  286    286   
    #[::tracing_test::traced_test]
  287    287   
    async fn http_prefix_empty_headers_request() {
  288         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         288  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  289    289   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  290    290   
  291    291   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  292    292   
        let result = client
  293    293   
            .http_prefix_headers()
  294    294   
            .set_foo_map(::std::option::Option::Some({
  295    295   
                let mut ret = ::std::collections::HashMap::new();
  296    296   
                ret.insert("Abc".to_owned().to_ascii_lowercase(), "".to_owned());
  297    297   
                ret
  298    298   
            }))

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_request_with_float_labels.rs

@@ -228,228 +346,346 @@
  248    248   
  249    249   
#[allow(unreachable_code, unused_variables)]
  250    250   
#[cfg(test)]
  251    251   
mod http_request_with_float_labels_test {
  252    252   
  253    253   
    /// Supports handling NaN float label values.
  254    254   
    /// Test ID: RestXmlSupportsNaNFloatLabels
  255    255   
    #[::tokio::test]
  256    256   
    #[::tracing_test::traced_test]
  257    257   
    async fn rest_xml_supports_na_n_float_labels_request() {
  258         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         258  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  259    259   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  260    260   
  261    261   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  262    262   
        let result = client
  263    263   
            .http_request_with_float_labels()
  264    264   
            .set_float(::std::option::Option::Some(
  265    265   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  266    266   
            ))
  267    267   
            .set_double(::std::option::Option::Some(
  268    268   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  269    269   
            ))
  270    270   
            .send()
  271    271   
            .await;
  272    272   
        let _ = dbg!(result);
  273    273   
        let http_request = request_receiver.expect_request();
  274    274   
        let body = http_request.body().bytes().expect("body should be strict");
  275    275   
        // No body.
  276    276   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  277    277   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  278    278   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  279    279   
        ::pretty_assertions::assert_eq!(uri.path(), "/FloatHttpLabels/NaN/NaN", "path was incorrect");
  280    280   
    }
  281    281   
  282    282   
    /// Supports handling Infinity float label values.
  283    283   
    /// Test ID: RestXmlSupportsInfinityFloatLabels
  284    284   
    #[::tokio::test]
  285    285   
    #[::tracing_test::traced_test]
  286    286   
    async fn rest_xml_supports_infinity_float_labels_request() {
  287         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         287  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  288    288   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  289    289   
  290    290   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  291    291   
        let result = client
  292    292   
            .http_request_with_float_labels()
  293    293   
            .set_float(::std::option::Option::Some(
  294    294   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  295    295   
            ))
  296    296   
            .set_double(::std::option::Option::Some(
  297    297   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  298    298   
            ))
  299    299   
            .send()
  300    300   
            .await;
  301    301   
        let _ = dbg!(result);
  302    302   
        let http_request = request_receiver.expect_request();
  303    303   
        let body = http_request.body().bytes().expect("body should be strict");
  304    304   
        // No body.
  305    305   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  306    306   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  307    307   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  308    308   
        ::pretty_assertions::assert_eq!(uri.path(), "/FloatHttpLabels/Infinity/Infinity", "path was incorrect");
  309    309   
    }
  310    310   
  311    311   
    /// Supports handling -Infinity float label values.
  312    312   
    /// Test ID: RestXmlSupportsNegativeInfinityFloatLabels
  313    313   
    #[::tokio::test]
  314    314   
    #[::tracing_test::traced_test]
  315    315   
    async fn rest_xml_supports_negative_infinity_float_labels_request() {
  316         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         316  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  317    317   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  318    318   
  319    319   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  320    320   
        let result = client
  321    321   
            .http_request_with_float_labels()
  322    322   
            .set_float(::std::option::Option::Some(
  323    323   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  324    324   
            ))
  325    325   
            .set_double(::std::option::Option::Some(
  326    326   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_request_with_greedy_label_in_path.rs

@@ -231,231 +291,291 @@
  251    251   
  252    252   
#[allow(unreachable_code, unused_variables)]
  253    253   
#[cfg(test)]
  254    254   
mod http_request_with_greedy_label_in_path_test {
  255    255   
  256    256   
    /// Serializes greedy labels and normal labels
  257    257   
    /// Test ID: HttpRequestWithGreedyLabelInPath
  258    258   
    #[::tokio::test]
  259    259   
    #[::tracing_test::traced_test]
  260    260   
    async fn http_request_with_greedy_label_in_path_request() {
  261         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         261  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  262    262   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  263    263   
  264    264   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  265    265   
        let result = client
  266    266   
            .http_request_with_greedy_label_in_path()
  267    267   
            .set_foo(::std::option::Option::Some("hello".to_owned()))
  268    268   
            .set_baz(::std::option::Option::Some("there/guy".to_owned()))
  269    269   
            .send()
  270    270   
            .await;
  271    271   
        let _ = dbg!(result);

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_request_with_labels.rs

@@ -310,310 +407,407 @@
  330    330   
  331    331   
#[allow(unreachable_code, unused_variables)]
  332    332   
#[cfg(test)]
  333    333   
mod http_request_with_labels_test {
  334    334   
  335    335   
    /// Sends a GET request that uses URI label bindings
  336    336   
    /// Test ID: InputWithHeadersAndAllParams
  337    337   
    #[::tokio::test]
  338    338   
    #[::tracing_test::traced_test]
  339    339   
    async fn input_with_headers_and_all_params_request() {
  340         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         340  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  341    341   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  342    342   
  343    343   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  344    344   
        let result = client
  345    345   
            .http_request_with_labels()
  346    346   
            .set_string(::std::option::Option::Some("string".to_owned()))
  347    347   
            .set_short(::std::option::Option::Some(1))
  348    348   
            .set_integer(::std::option::Option::Some(2))
  349    349   
            .set_long(::std::option::Option::Some(3))
  350    350   
            .set_float(::std::option::Option::Some(4.1_f32))
  351    351   
            .set_double(::std::option::Option::Some(5.1_f64))
  352    352   
            .set_boolean(::std::option::Option::Some(true))
  353    353   
            .set_timestamp(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  354    354   
                1576540098, 0_f64,
  355    355   
            )))
  356    356   
            .send()
  357    357   
            .await;
  358    358   
        let _ = dbg!(result);
  359    359   
        let http_request = request_receiver.expect_request();
  360    360   
        let body = http_request.body().bytes().expect("body should be strict");
  361    361   
        // No body.
  362    362   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  363    363   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  364    364   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  365    365   
        ::pretty_assertions::assert_eq!(
  366    366   
            uri.path(),
  367    367   
            "/HttpRequestWithLabels/string/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
  368    368   
            "path was incorrect"
  369    369   
        );
  370    370   
    }
  371    371   
  372    372   
    /// Sends a GET request that uses URI label bindings
  373    373   
    /// Test ID: HttpRequestLabelEscaping
  374    374   
    #[::tokio::test]
  375    375   
    #[::tracing_test::traced_test]
  376    376   
    async fn http_request_label_escaping_request() {
  377         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         377  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  378    378   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  379    379   
  380    380   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  381    381   
        let result = client
  382    382   
            .http_request_with_labels()
  383    383   
            .set_string(::std::option::Option::Some(" %:/?#[]@!$&'()*+,;=😹".to_owned()))
  384    384   
            .set_short(::std::option::Option::Some(1))
  385    385   
            .set_integer(::std::option::Option::Some(2))
  386    386   
            .set_long(::std::option::Option::Some(3))
  387    387   
            .set_float(::std::option::Option::Some(4.1_f32))