Client Test

Client Test

rev. 3d2cf9bfcccf2cb5e5660fe2685c9174956bfcad (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/Cargo.toml

@@ -13,13 +46,47 @@
   33     33   
[dependencies.hyper]
   34     34   
version = "0.14.26"
   35     35   
features = ["stream"]
   36     36   
[dependencies.tracing]
   37     37   
version = "0.1"
   38     38   
[features]
   39     39   
test-util = ["aws-smithy-runtime/test-util"]
   40     40   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   41     41   
behavior-version-latest = []
   42     42   
rustls = ["aws-smithy-runtime/tls-rustls"]
          43  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   43     44   
gated-tests = []
   44         -
default = ["rt-tokio", "rustls"]
          45  +
default = ["rt-tokio", "rustls", "default-https-client"]
   45     46   
   46     47   

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/Cargo.toml

@@ -1,1 +52,53 @@
   19     19   
features = ["client"]
   20     20   
[dependencies.aws-smithy-runtime-api]
   21     21   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
   22     22   
features = ["client", "http-02x"]
   23     23   
[dependencies.aws-smithy-types]
   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  +
[dev-dependencies.aws-smithy-http-client]
          30  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
          31  +
features = ["test-util"]
   29     32   
[dev-dependencies.aws-smithy-protocol-test]
   30     33   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   31         -
[dev-dependencies.aws-smithy-runtime]
   32         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   33         -
features = ["client", "test-util"]
   34     34   
[dev-dependencies.pretty_assertions]
   35     35   
version = "1.3.0"
   36     36   
[dev-dependencies.tokio]
   37     37   
version = "1.23.1"
   38     38   
features = ["macros", "test-util", "rt-multi-thread"]
   39     39   
[dev-dependencies.tracing]
   40     40   
version = "0.1"
   41     41   
[dev-dependencies.tracing-test]
   42     42   
version = "0.2.5"
   43     43   
features = ["no-env-filter"]
   44     44   
[features]
   45     45   
test-util = ["aws-smithy-runtime/test-util"]
   46     46   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   47     47   
behavior-version-latest = []
   48     48   
rustls = ["aws-smithy-runtime/tls-rustls"]
          49  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   49     50   
gated-tests = []
   50         -
default = ["rt-tokio", "rustls"]
          51  +
default = ["rt-tokio", "rustls", "default-https-client"]
   51     52   
   52     53   

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/operation/operation.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 operation_test {
  228    228   
  229    229   
    /// Test ID: BasicQueryCompatTest
  230    230   
    #[::tokio::test]
  231    231   
    #[::tracing_test::traced_test]
  232    232   
    async fn basic_query_compat_test_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   
            .operation()
  239    239   
            .set_message(::std::option::Option::Some("hello!".to_owned()))
  240    240   
            .send()
  241    241   
            .await;
  242    242   
        let _ = dbg!(result);
  243    243   
        let http_request = request_receiver.expect_request();

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

@@ -13,13 +66,67 @@
   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.md-5]
   40     40   
version = "0.10.0"
   41     41   
[dependencies.tracing]
   42     42   
version = "0.1"
          43  +
[dev-dependencies.aws-smithy-http-client]
          44  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
          45  +
features = ["test-util"]
   43     46   
[dev-dependencies.aws-smithy-protocol-test]
   44     47   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   45         -
[dev-dependencies.aws-smithy-runtime]
   46         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   47         -
features = ["client", "test-util"]
   48     48   
[dev-dependencies.aws-smithy-types]
   49     49   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
   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/rest_json/rust-client-codegen/src/operation/all_query_string_types.rs

@@ -369,369 +429,429 @@
  389    389   
  390    390   
#[allow(unreachable_code, unused_variables)]
  391    391   
#[cfg(test)]
  392    392   
mod all_query_string_types_test {
  393    393   
  394    394   
    /// Serializes query string parameters with all supported types
  395    395   
    /// Test ID: RestJsonAllQueryStringTypes
  396    396   
    #[::tokio::test]
  397    397   
    #[::tracing_test::traced_test]
  398    398   
    async fn rest_json_all_query_string_types_request() {
  399         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         399  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  400    400   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  401    401   
  402    402   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  403    403   
        let result = client
  404    404   
            .all_query_string_types()
  405    405   
            .set_query_string(::std::option::Option::Some("Hello there".to_owned()))
  406    406   
            .set_query_string_list(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
  407    407   
            .set_query_string_set(::std::option::Option::Some(vec!["a".to_owned(), "b".to_owned(), "c".to_owned()]))
  408    408   
            .set_query_byte(::std::option::Option::Some(1))
  409    409   
            .set_query_short(::std::option::Option::Some(2))
@@ -494,494 +727,727 @@
  514    514   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  515    515   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  516    516   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  517    517   
    }
  518    518   
  519    519   
    /// Handles query string maps
  520    520   
    /// Test ID: RestJsonQueryStringMap
  521    521   
    #[::tokio::test]
  522    522   
    #[::tracing_test::traced_test]
  523    523   
    async fn rest_json_query_string_map_request() {
  524         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         524  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  525    525   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  526    526   
  527    527   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  528    528   
        let result = client
  529    529   
            .all_query_string_types()
  530    530   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  531    531   
                let mut ret = ::std::collections::HashMap::new();
  532    532   
                ret.insert("QueryParamsStringKeyA".to_owned(), vec!["Foo".to_owned()]);
  533    533   
                ret.insert("QueryParamsStringKeyB".to_owned(), vec!["Bar".to_owned()]);
  534    534   
                ret
  535    535   
            }))
  536    536   
            .send()
  537    537   
            .await;
  538    538   
        let _ = dbg!(result);
  539    539   
        let http_request = request_receiver.expect_request();
  540    540   
        let expected_query_params = &["QueryParamsStringKeyA=Foo", "QueryParamsStringKeyB=Bar"];
  541    541   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  542    542   
        let body = http_request.body().bytes().expect("body should be strict");
  543    543   
        // No body.
  544    544   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  545    545   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  546    546   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  547    547   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  548    548   
    }
  549    549   
  550    550   
    /// Handles escaping all required characters in the query string.
  551    551   
    /// Test ID: RestJsonQueryStringEscaping
  552    552   
    #[::tokio::test]
  553    553   
    #[::tracing_test::traced_test]
  554    554   
    async fn rest_json_query_string_escaping_request() {
  555         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         555  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  556    556   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  557    557   
  558    558   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  559    559   
        let result = client
  560    560   
            .all_query_string_types()
  561    561   
            .set_query_string(::std::option::Option::Some(" %:/?#[]@!$&'()*+,;=😹".to_owned()))
  562    562   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  563    563   
                let mut ret = ::std::collections::HashMap::new();
  564    564   
                ret.insert("String".to_owned(), vec![" %:/?#[]@!$&'()*+,;=😹".to_owned()]);
  565    565   
                ret
  566    566   
            }))
  567    567   
            .send()
  568    568   
            .await;
  569    569   
        let _ = dbg!(result);
  570    570   
        let http_request = request_receiver.expect_request();
  571    571   
        let expected_query_params = &["String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"];
  572    572   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  573    573   
        let body = http_request.body().bytes().expect("body should be strict");
  574    574   
        // No body.
  575    575   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  576    576   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  577    577   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  578    578   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  579    579   
    }
  580    580   
  581    581   
    /// Supports handling NaN float query values.
  582    582   
    /// Test ID: RestJsonSupportsNaNFloatQueryValues
  583    583   
    #[::tokio::test]
  584    584   
    #[::tracing_test::traced_test]
  585    585   
    async fn rest_json_supports_na_n_float_query_values_request() {
  586         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         586  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  587    587   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  588    588   
  589    589   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  590    590   
        let result = client
  591    591   
            .all_query_string_types()
  592    592   
            .set_query_float(::std::option::Option::Some(
  593    593   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  594    594   
            ))
  595    595   
            .set_query_double(::std::option::Option::Some(
  596    596   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
  597    597   
            ))
  598    598   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  599    599   
                let mut ret = ::std::collections::HashMap::new();
  600    600   
                ret.insert("Float".to_owned(), vec!["NaN".to_owned()]);
  601    601   
                ret.insert("Double".to_owned(), vec!["NaN".to_owned()]);
  602    602   
                ret
  603    603   
            }))
  604    604   
            .send()
  605    605   
            .await;
  606    606   
        let _ = dbg!(result);
  607    607   
        let http_request = request_receiver.expect_request();
  608    608   
        let expected_query_params = &["Float=NaN", "Double=NaN"];
  609    609   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  610    610   
        let body = http_request.body().bytes().expect("body should be strict");
  611    611   
        // No body.
  612    612   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  613    613   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  614    614   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  615    615   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  616    616   
    }
  617    617   
  618    618   
    /// Supports handling Infinity float query values.
  619    619   
    /// Test ID: RestJsonSupportsInfinityFloatQueryValues
  620    620   
    #[::tokio::test]
  621    621   
    #[::tracing_test::traced_test]
  622    622   
    async fn rest_json_supports_infinity_float_query_values_request() {
  623         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         623  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  624    624   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  625    625   
  626    626   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  627    627   
        let result = client
  628    628   
            .all_query_string_types()
  629    629   
            .set_query_float(::std::option::Option::Some(
  630    630   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  631    631   
            ))
  632    632   
            .set_query_double(::std::option::Option::Some(
  633    633   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  634    634   
            ))
  635    635   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  636    636   
                let mut ret = ::std::collections::HashMap::new();
  637    637   
                ret.insert("Float".to_owned(), vec!["Infinity".to_owned()]);
  638    638   
                ret.insert("Double".to_owned(), vec!["Infinity".to_owned()]);
  639    639   
                ret
  640    640   
            }))
  641    641   
            .send()
  642    642   
            .await;
  643    643   
        let _ = dbg!(result);
  644    644   
        let http_request = request_receiver.expect_request();
  645    645   
        let expected_query_params = &["Float=Infinity", "Double=Infinity"];
  646    646   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  647    647   
        let body = http_request.body().bytes().expect("body should be strict");
  648    648   
        // No body.
  649    649   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  650    650   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  651    651   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  652    652   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  653    653   
    }
  654    654   
  655    655   
    /// Supports handling -Infinity float query values.
  656    656   
    /// Test ID: RestJsonSupportsNegativeInfinityFloatQueryValues
  657    657   
    #[::tokio::test]
  658    658   
    #[::tracing_test::traced_test]
  659    659   
    async fn rest_json_supports_negative_infinity_float_query_values_request() {
  660         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         660  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  661    661   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  662    662   
  663    663   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  664    664   
        let result = client
  665    665   
            .all_query_string_types()
  666    666   
            .set_query_float(::std::option::Option::Some(
  667    667   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  668    668   
            ))
  669    669   
            .set_query_double(::std::option::Option::Some(
  670    670   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  671    671   
            ))
  672    672   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  673    673   
                let mut ret = ::std::collections::HashMap::new();
  674    674   
                ret.insert("Float".to_owned(), vec!["-Infinity".to_owned()]);
  675    675   
                ret.insert("Double".to_owned(), vec!["-Infinity".to_owned()]);
  676    676   
                ret
  677    677   
            }))
  678    678   
            .send()
  679    679   
            .await;
  680    680   
        let _ = dbg!(result);
  681    681   
        let http_request = request_receiver.expect_request();
  682    682   
        let expected_query_params = &["Float=-Infinity", "Double=-Infinity"];
  683    683   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  684    684   
        let body = http_request.body().bytes().expect("body should be strict");
  685    685   
        // No body.
  686    686   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  687    687   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  688    688   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  689    689   
        ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
  690    690   
    }
  691    691   
  692    692   
    /// Query values of 0 and false are serialized
  693    693   
    /// Test ID: RestJsonZeroAndFalseQueryValues
  694    694   
    #[::tokio::test]
  695    695   
    #[::tracing_test::traced_test]
  696    696   
    async fn rest_json_zero_and_false_query_values_request() {
  697         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         697  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  698    698   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  699    699   
  700    700   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  701    701   
        let result = client
  702    702   
            .all_query_string_types()
  703    703   
            .set_query_integer(::std::option::Option::Some(0))
  704    704   
            .set_query_boolean(::std::option::Option::Some(false))
  705    705   
            .set_query_params_map_of_string_list(::std::option::Option::Some({
  706    706   
                let mut ret = ::std::collections::HashMap::new();
  707    707   
                ret.insert("Integer".to_owned(), vec!["0".to_owned()]);

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_and_variable_query_string.rs

@@ -225,225 +313,313 @@
  245    245   
  246    246   
#[allow(unreachable_code, unused_variables)]
  247    247   
#[cfg(test)]
  248    248   
mod constant_and_variable_query_string_test {
  249    249   
  250    250   
    /// Mixes constant and variable query string parameters
  251    251   
    /// Test ID: RestJsonConstantAndVariableQueryStringMissingOneValue
  252    252   
    #[::tokio::test]
  253    253   
    #[::tracing_test::traced_test]
  254    254   
    async fn rest_json_constant_and_variable_query_string_missing_one_value_request() {
  255         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         255  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  256    256   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  257    257   
  258    258   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  259    259   
        let result = client
  260    260   
            .constant_and_variable_query_string()
  261    261   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  262    262   
            .send()
  263    263   
            .await;
  264    264   
        let _ = dbg!(result);
  265    265   
        let http_request = request_receiver.expect_request();
  266    266   
        let expected_query_params = &["foo=bar", "baz=bam"];
  267    267   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  268    268   
        let forbid_params = &["maybeSet"];
  269    269   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_query_params(&http_request, forbid_params));
  270    270   
        let body = http_request.body().bytes().expect("body should be strict");
  271    271   
        // No body.
  272    272   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  273    273   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  274    274   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  275    275   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantAndVariableQueryString", "path was incorrect");
  276    276   
    }
  277    277   
  278    278   
    /// Mixes constant and variable query string parameters
  279    279   
    /// Test ID: RestJsonConstantAndVariableQueryStringAllValues
  280    280   
    #[::tokio::test]
  281    281   
    #[::tracing_test::traced_test]
  282    282   
    async fn rest_json_constant_and_variable_query_string_all_values_request() {
  283         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         283  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  284    284   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  285    285   
  286    286   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  287    287   
        let result = client
  288    288   
            .constant_and_variable_query_string()
  289    289   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  290    290   
            .set_maybe_set(::std::option::Option::Some("yes".to_owned()))
  291    291   
            .send()
  292    292   
            .await;
  293    293   
        let _ = dbg!(result);

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_query_string.rs

@@ -225,225 +285,285 @@
  245    245   
  246    246   
#[allow(unreachable_code, unused_variables)]
  247    247   
#[cfg(test)]
  248    248   
mod constant_query_string_test {
  249    249   
  250    250   
    /// Includes constant query string parameters
  251    251   
    /// Test ID: RestJsonConstantQueryString
  252    252   
    #[::tokio::test]
  253    253   
    #[::tracing_test::traced_test]
  254    254   
    async fn rest_json_constant_query_string_request() {
  255         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         255  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  256    256   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  257    257   
  258    258   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  259    259   
        let result = client
  260    260   
            .constant_query_string()
  261    261   
            .set_hello(::std::option::Option::Some("hi".to_owned()))
  262    262   
            .send()
  263    263   
            .await;
  264    264   
        let _ = dbg!(result);
  265    265   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/document_type.rs

@@ -202,202 +400,400 @@
  222    222   
  223    223   
#[allow(unreachable_code, unused_variables)]
  224    224   
#[cfg(test)]
  225    225   
mod document_type_test {
  226    226   
  227    227   
    /// Serializes document types as part of the JSON request payload with no escaping.
  228    228   
    /// Test ID: DocumentTypeInputWithObject
  229    229   
    #[::tokio::test]
  230    230   
    #[::tracing_test::traced_test]
  231    231   
    async fn document_type_input_with_object_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   
            .document_type()
  238    238   
            .set_string_value(::std::option::Option::Some("string".to_owned()))
  239    239   
            .set_document_value(::std::option::Option::Some({
  240    240   
                let json_bytes = br#"{
  241    241   
                        "foo": "bar"
  242    242   
                    }"#;
  243    243   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  244    244   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
  245    245   
            }))
  246    246   
            .send()
  247    247   
            .await;
  248    248   
        let _ = dbg!(result);
  249    249   
        let http_request = request_receiver.expect_request();
  250    250   
        let expected_headers = [("Content-Type", "application/json")];
  251    251   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  252    252   
        let body = http_request.body().bytes().expect("body should be strict");
  253    253   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  254    254   
            body,
  255    255   
            "{\n    \"stringValue\": \"string\",\n    \"documentValue\": {\n        \"foo\": \"bar\"\n    }\n}",
  256    256   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  257    257   
        ));
  258    258   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  259    259   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  260    260   
        ::pretty_assertions::assert_eq!(uri.path(), "/DocumentType", "path was incorrect");
  261    261   
    }
  262    262   
  263    263   
    /// Serializes document types using a string.
  264    264   
    /// Test ID: DocumentInputWithString
  265    265   
    #[::tokio::test]
  266    266   
    #[::tracing_test::traced_test]
  267    267   
    async fn document_input_with_string_request() {
  268         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         268  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  269    269   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  270    270   
  271    271   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  272    272   
        let result = client
  273    273   
            .document_type()
  274    274   
            .set_string_value(::std::option::Option::Some("string".to_owned()))
  275    275   
            .set_document_value(::std::option::Option::Some({
  276    276   
                let json_bytes = br#""hello""#;
  277    277   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  278    278   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
  279    279   
            }))
  280    280   
            .send()
  281    281   
            .await;
  282    282   
        let _ = dbg!(result);
  283    283   
        let http_request = request_receiver.expect_request();
  284    284   
        let expected_headers = [("Content-Type", "application/json")];
  285    285   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  286    286   
        let body = http_request.body().bytes().expect("body should be strict");
  287    287   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  288    288   
            body,
  289    289   
            "{\n    \"stringValue\": \"string\",\n    \"documentValue\": \"hello\"\n}",
  290    290   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  291    291   
        ));
  292    292   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  293    293   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  294    294   
        ::pretty_assertions::assert_eq!(uri.path(), "/DocumentType", "path was incorrect");
  295    295   
    }
  296    296   
  297    297   
    /// Serializes document types using a number.
  298    298   
    /// Test ID: DocumentInputWithNumber
  299    299   
    #[::tokio::test]
  300    300   
    #[::tracing_test::traced_test]
  301    301   
    async fn document_input_with_number_request() {
  302         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         302  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  303    303   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  304    304   
  305    305   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  306    306   
        let result = client
  307    307   
            .document_type()
  308    308   
            .set_string_value(::std::option::Option::Some("string".to_owned()))
  309    309   
            .set_document_value(::std::option::Option::Some({
  310    310   
                let json_bytes = br#"10"#;
  311    311   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  312    312   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
  313    313   
            }))
  314    314   
            .send()
  315    315   
            .await;
  316    316   
        let _ = dbg!(result);
  317    317   
        let http_request = request_receiver.expect_request();
  318    318   
        let expected_headers = [("Content-Type", "application/json")];
  319    319   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  320    320   
        let body = http_request.body().bytes().expect("body should be strict");
  321    321   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  322    322   
            body,
  323    323   
            "{\n    \"stringValue\": \"string\",\n    \"documentValue\": 10\n}",
  324    324   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  325    325   
        ));
  326    326   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  327    327   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  328    328   
        ::pretty_assertions::assert_eq!(uri.path(), "/DocumentType", "path was incorrect");
  329    329   
    }
  330    330   
  331    331   
    /// Serializes document types using a boolean.
  332    332   
    /// Test ID: DocumentInputWithBoolean
  333    333   
    #[::tokio::test]
  334    334   
    #[::tracing_test::traced_test]
  335    335   
    async fn document_input_with_boolean_request() {
  336         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         336  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  337    337   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  338    338   
  339    339   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  340    340   
        let result = client
  341    341   
            .document_type()
  342    342   
            .set_string_value(::std::option::Option::Some("string".to_owned()))
  343    343   
            .set_document_value(::std::option::Option::Some({
  344    344   
                let json_bytes = br#"true"#;
  345    345   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  346    346   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
  347    347   
            }))
  348    348   
            .send()
  349    349   
            .await;
  350    350   
        let _ = dbg!(result);
  351    351   
        let http_request = request_receiver.expect_request();
  352    352   
        let expected_headers = [("Content-Type", "application/json")];
  353    353   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  354    354   
        let body = http_request.body().bytes().expect("body should be strict");
  355    355   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  356    356   
            body,
  357    357   
            "{\n    \"stringValue\": \"string\",\n    \"documentValue\": true\n}",
  358    358   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  359    359   
        ));
  360    360   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  361    361   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  362    362   
        ::pretty_assertions::assert_eq!(uri.path(), "/DocumentType", "path was incorrect");
  363    363   
    }
  364    364   
  365    365   
    /// Serializes document types using a list.
  366    366   
    /// Test ID: DocumentInputWithList
  367    367   
    #[::tokio::test]
  368    368   
    #[::tracing_test::traced_test]
  369    369   
    async fn document_input_with_list_request() {
  370         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         370  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  371    371   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  372    372   
  373    373   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  374    374   
        let result = client
  375    375   
            .document_type()
  376    376   
            .set_string_value(::std::option::Option::Some("string".to_owned()))
  377    377   
            .set_document_value(::std::option::Option::Some({
  378    378   
                let json_bytes = br#"[
  379    379   
                        true,
  380    380   
                        "hi",

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/document_type_as_map_value.rs

@@ -210,210 +270,270 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod document_type_as_map_value_test {
  234    234   
  235    235   
    /// Serializes a map that uses documents as the value.
  236    236   
    /// Test ID: DocumentTypeAsMapValueInput
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn document_type_as_map_value_input_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   
            .document_type_as_map_value()
  246    246   
            .set_doc_valued_map(::std::option::Option::Some({
  247    247   
                let mut ret = ::std::collections::HashMap::new();
  248    248   
                ret.insert("foo".to_owned(), {
  249    249   
                    let json_bytes = br#"{
  250    250   
                                "f": 1,

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/document_type_as_payload.rs

@@ -210,210 +305,305 @@
  230    230   
  231    231   
#[allow(unreachable_code, unused_variables)]
  232    232   
#[cfg(test)]
  233    233   
mod document_type_as_payload_test {
  234    234   
  235    235   
    /// Serializes a document as the target of the httpPayload trait.
  236    236   
    /// Test ID: DocumentTypeAsPayloadInput
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn document_type_as_payload_input_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   
            .document_type_as_payload()
  246    246   
            .set_document_value(::std::option::Option::Some({
  247    247   
                let json_bytes = br#"{
  248    248   
                        "foo": "bar"
  249    249   
                    }"#;
  250    250   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  251    251   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
  252    252   
            }))
  253    253   
            .send()
  254    254   
            .await;
  255    255   
        let _ = dbg!(result);
  256    256   
        let http_request = request_receiver.expect_request();
  257    257   
        let expected_headers = [("Content-Type", "application/json")];
  258    258   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  259    259   
        let body = http_request.body().bytes().expect("body should be strict");
  260    260   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  261    261   
            body,
  262    262   
            "{\n    \"foo\": \"bar\"\n}",
  263    263   
            ::aws_smithy_protocol_test::MediaType::from("application/json"),
  264    264   
        ));
  265    265   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  266    266   
        ::pretty_assertions::assert_eq!(http_request.method(), "PUT", "method was incorrect");
  267    267   
        ::pretty_assertions::assert_eq!(uri.path(), "/DocumentTypeAsPayload", "path was incorrect");
  268    268   
    }
  269    269   
  270    270   
    /// Serializes a document as the target of the httpPayload trait using a string.
  271    271   
    /// Test ID: DocumentTypeAsPayloadInputString
  272    272   
    #[::tokio::test]
  273    273   
    #[::tracing_test::traced_test]
  274    274   
    async fn document_type_as_payload_input_string_request() {
  275         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         275  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  276    276   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  277    277   
  278    278   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  279    279   
        let result = client
  280    280   
            .document_type_as_payload()
  281    281   
            .set_document_value(::std::option::Option::Some({
  282    282   
                let json_bytes = br#""hello""#;
  283    283   
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
  284    284   
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
  285    285   
            }))

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

@@ -206,206 +266,266 @@
  226    226   
#[cfg(test)]
  227    227   
mod empty_input_and_empty_output_test {
  228    228   
  229    229   
    /// Clients should not serialize a JSON payload when no parameters
  230    230   
    /// are given that are sent in the body. A service will tolerate
  231    231   
    /// clients that omit a payload or that send a JSON object.
  232    232   
    /// Test ID: RestJsonEmptyInputAndEmptyOutput
  233    233   
    #[::tokio::test]
  234    234   
    #[::tracing_test::traced_test]
  235    235   
    async fn rest_json_empty_input_and_empty_output_request() {
  236         -
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
         236  +
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  237    237   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  238    238   
  239    239   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  240    240   
        let result = client.empty_input_and_empty_output().send().await;
  241    241   
        let _ = dbg!(result);
  242    242   
        let http_request = request_receiver.expect_request();
  243    243   
        let body = http_request.body().bytes().expect("body should be strict");
  244    244   
        // No body.
  245    245   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  246    246   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");

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

@@ -210,210 +270,270 @@
  230    230   
#[allow(unreachable_code, unused_variables)]
  231    231   
#[cfg(test)]
  232    232   
mod endpoint_operation_test {
  233    233   
  234    234   
    /// Operations can prepend to the given host if they define the
  235    235   
    /// endpoint trait.
  236    236   
    /// Test ID: RestJsonEndpointTrait
  237    237   
    #[::tokio::test]
  238    238   
    #[::tracing_test::traced_test]
  239    239   
    async fn rest_json_endpoint_trait_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.endpoint_operation().send().await;
  245    245   
        let _ = dbg!(result);
  246    246   
        let http_request = request_receiver.expect_request();
  247    247   
        let body = http_request.body().bytes().expect("body should be strict");
  248    248   
        // No body.
  249    249   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  250    250   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");

tmp-codegen-diff/codegen-client-test/rest_json/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: RestJsonEndpointTraitWithHostLabel
  256    256   
    #[::tokio::test]
  257    257   
    #[::tracing_test::traced_test]
  258    258   
    async fn rest_json_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_json/rust-client-codegen/src/operation/host_with_path_operation.rs

@@ -204,204 +264,264 @@
  224    224   
  225    225   
#[allow(unreachable_code, unused_variables)]
  226    226   
#[cfg(test)]
  227    227   
mod host_with_path_operation_test {
  228    228   
  229    229   
    /// Custom endpoints supplied by users can have paths
  230    230   
    /// Test ID: RestJsonHostWithPath
  231    231   
    #[::tokio::test]
  232    232   
    #[::tracing_test::traced_test]
  233    233   
    async fn rest_json_host_with_path_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()
  236    236   
            .with_test_defaults()
  237    237   
            .endpoint_url("https://example.com/custom");
  238    238   
  239    239   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  240    240   
        let result = client.host_with_path_operation().send().await;
  241    241   
        let _ = dbg!(result);
  242    242   
        let http_request = request_receiver.expect_request();
  243    243   
        let body = http_request.body().bytes().expect("body should be strict");
  244    244   
        // No body.

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_checksum_required.rs

@@ -212,212 +272,272 @@
  232    232   
  233    233   
#[allow(unreachable_code, unused_variables)]
  234    234   
#[cfg(test)]
  235    235   
mod http_checksum_required_test {
  236    236   
  237    237   
    /// Adds Content-MD5 header
  238    238   
    /// Test ID: RestJsonHttpChecksumRequired
  239    239   
    #[::tokio::test]
  240    240   
    #[::tracing_test::traced_test]
  241    241   
    async fn rest_json_http_checksum_required_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
  247    247   
            .http_checksum_required()
  248    248   
            .set_foo(::std::option::Option::Some("base64 encoded md5 checksum".to_owned()))
  249    249   
            .send()
  250    250   
            .await;
  251    251   
        let _ = dbg!(result);
  252    252   
        let http_request = request_receiver.expect_request();

tmp-codegen-diff/codegen-client-test/rest_json/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: RestJsonEnumPayloadRequest
  230    230   
    #[::tokio::test]
  231    231   
    #[::tracing_test::traced_test]
  232    232   
    async fn rest_json_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;