213 213 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
214 214 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
215 215 | })?;
|
216 216 | cfg.interceptor_state()
|
217 217 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
218 218 | ::std::result::Result::Ok(())
|
219 219 | }
|
220 220 | }
|
221 221 | #[allow(unreachable_code, unused_variables)]
|
222 222 | #[cfg(test)]
|
223 - | mod simple_input_params_request_test {
|
223 + | mod simple_input_params_test {
|
224 + |
|
224 225 | /// Serializes strings
|
225 226 | /// Test ID: QuerySimpleInputParamsStrings
|
226 227 | #[::tokio::test]
|
227 - | #[allow(unused_mut)]
|
228 + | #[::tracing_test::traced_test]
|
228 229 | async fn query_simple_input_params_strings_request() {
|
229 230 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
230 231 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
231 232 |
|
232 233 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
233 234 | let result = client
|
234 235 | .simple_input_params()
|
235 236 | .set_foo(::std::option::Option::Some("val1".to_owned()))
|
236 237 | .set_bar(::std::option::Option::Some("val2".to_owned()))
|
237 238 | .send()
|
238 239 | .await;
|
239 240 | let _ = dbg!(result);
|
240 241 | let http_request = request_receiver.expect_request();
|
241 242 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
242 243 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
243 244 | let required_headers = &["Content-Length"];
|
244 245 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
245 246 | let body = http_request.body().bytes().expect("body should be strict");
|
246 247 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
247 248 | body,
|
248 249 | "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Bar=val2",
|
249 250 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
250 251 | ));
|
251 252 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
252 253 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
253 254 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
254 255 | }
|
255 256 | /// Serializes booleans that are true
|
256 257 | /// Test ID: QuerySimpleInputParamsStringAndBooleanTrue
|
257 258 | #[::tokio::test]
|
258 - | #[allow(unused_mut)]
|
259 + | #[::tracing_test::traced_test]
|
259 260 | async fn query_simple_input_params_string_and_boolean_true_request() {
|
260 261 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
261 262 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
262 263 |
|
263 264 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
264 265 | let result = client
|
265 266 | .simple_input_params()
|
266 267 | .set_foo(::std::option::Option::Some("val1".to_owned()))
|
267 268 | .set_baz(::std::option::Option::Some(true))
|
268 269 | .send()
|
269 270 | .await;
|
270 271 | let _ = dbg!(result);
|
271 272 | let http_request = request_receiver.expect_request();
|
272 273 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
273 274 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
274 275 | let required_headers = &["Content-Length"];
|
275 276 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
276 277 | let body = http_request.body().bytes().expect("body should be strict");
|
277 278 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
278 279 | body,
|
279 280 | "Action=SimpleInputParams&Version=2020-01-08&Foo=val1&Baz=true",
|
280 281 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
281 282 | ));
|
282 283 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
283 284 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
284 285 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
285 286 | }
|
286 287 | /// Serializes booleans that are false
|
287 288 | /// Test ID: QuerySimpleInputParamsStringsAndBooleanFalse
|
288 289 | #[::tokio::test]
|
289 - | #[allow(unused_mut)]
|
290 + | #[::tracing_test::traced_test]
|
290 291 | async fn query_simple_input_params_strings_and_boolean_false_request() {
|
291 292 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
292 293 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
293 294 |
|
294 295 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
295 296 | let result = client.simple_input_params().set_baz(::std::option::Option::Some(false)).send().await;
|
296 297 | let _ = dbg!(result);
|
297 298 | let http_request = request_receiver.expect_request();
|
298 299 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
299 300 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
300 301 | let required_headers = &["Content-Length"];
|
301 302 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
302 303 | let body = http_request.body().bytes().expect("body should be strict");
|
303 304 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
304 305 | body,
|
305 306 | "Action=SimpleInputParams&Version=2020-01-08&Baz=false",
|
306 307 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
307 308 | ));
|
308 309 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
309 310 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
310 311 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
311 312 | }
|
312 313 | /// Serializes integers
|
313 314 | /// Test ID: QuerySimpleInputParamsInteger
|
314 315 | #[::tokio::test]
|
315 - | #[allow(unused_mut)]
|
316 + | #[::tracing_test::traced_test]
|
316 317 | async fn query_simple_input_params_integer_request() {
|
317 318 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
318 319 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
319 320 |
|
320 321 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
321 322 | let result = client.simple_input_params().set_bam(::std::option::Option::Some(10)).send().await;
|
322 323 | let _ = dbg!(result);
|
323 324 | let http_request = request_receiver.expect_request();
|
324 325 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
325 326 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
326 327 | let required_headers = &["Content-Length"];
|
327 328 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
328 329 | let body = http_request.body().bytes().expect("body should be strict");
|
329 330 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
330 331 | body,
|
331 332 | "Action=SimpleInputParams&Version=2020-01-08&Bam=10",
|
332 333 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
333 334 | ));
|
334 335 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
335 336 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
336 337 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
337 338 | }
|
338 339 | /// Serializes floats
|
339 340 | /// Test ID: QuerySimpleInputParamsFloat
|
340 341 | #[::tokio::test]
|
341 - | #[allow(unused_mut)]
|
342 + | #[::tracing_test::traced_test]
|
342 343 | async fn query_simple_input_params_float_request() {
|
343 344 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
344 345 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
345 346 |
|
346 347 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
347 348 | let result = client.simple_input_params().set_boo(::std::option::Option::Some(10.8_f64)).send().await;
|
348 349 | let _ = dbg!(result);
|
349 350 | let http_request = request_receiver.expect_request();
|
350 351 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
351 352 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
352 353 | let required_headers = &["Content-Length"];
|
353 354 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
354 355 | let body = http_request.body().bytes().expect("body should be strict");
|
355 356 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
356 357 | body,
|
357 358 | "Action=SimpleInputParams&Version=2020-01-08&Boo=10.8",
|
358 359 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
359 360 | ));
|
360 361 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
361 362 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
362 363 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
363 364 | }
|
364 365 | /// Blobs are base64 encoded in the query string
|
365 366 | /// Test ID: QuerySimpleInputParamsBlob
|
366 367 | #[::tokio::test]
|
367 - | #[allow(unused_mut)]
|
368 + | #[::tracing_test::traced_test]
|
368 369 | async fn query_simple_input_params_blob_request() {
|
369 370 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
370 371 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
371 372 |
|
372 373 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
373 374 | let result = client
|
374 375 | .simple_input_params()
|
375 376 | .set_qux(::std::option::Option::Some(::aws_smithy_types::Blob::new("value")))
|
376 377 | .send()
|
377 378 | .await;
|
378 379 | let _ = dbg!(result);
|
379 380 | let http_request = request_receiver.expect_request();
|
380 381 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
381 382 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
382 383 | let required_headers = &["Content-Length"];
|
383 384 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
384 385 | let body = http_request.body().bytes().expect("body should be strict");
|
385 386 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
386 387 | body,
|
387 388 | "Action=SimpleInputParams&Version=2020-01-08&Qux=dmFsdWU%3D",
|
388 389 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
389 390 | ));
|
390 391 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
391 392 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
392 393 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
393 394 | }
|
394 395 | /// Serializes enums in the query string
|
395 396 | /// Test ID: QueryEnums
|
396 397 | #[::tokio::test]
|
397 - | #[allow(unused_mut)]
|
398 + | #[::tracing_test::traced_test]
|
398 399 | async fn query_enums_request() {
|
399 400 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
400 401 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
401 402 |
|
402 403 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
403 404 | let result = client
|
404 405 | .simple_input_params()
|
405 406 | .set_foo_enum(::std::option::Option::Some(
|
406 407 | "Foo".parse::<crate::types::FooEnum>().expect("static value validated to member"),
|
407 408 | ))
|
408 409 | .send()
|
409 410 | .await;
|
410 411 | let _ = dbg!(result);
|
411 412 | let http_request = request_receiver.expect_request();
|
412 413 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
413 414 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
414 415 | let required_headers = &["Content-Length"];
|
415 416 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
416 417 | let body = http_request.body().bytes().expect("body should be strict");
|
417 418 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
418 419 | body,
|
419 420 | "Action=SimpleInputParams&Version=2020-01-08&FooEnum=Foo",
|
420 421 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
421 422 | ));
|
422 423 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
423 424 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
424 425 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
425 426 | }
|
426 427 | /// Serializes intEnums in the query string
|
427 428 | /// Test ID: QueryIntEnums
|
428 429 | #[::tokio::test]
|
429 - | #[allow(unused_mut)]
|
430 + | #[::tracing_test::traced_test]
|
430 431 | async fn query_int_enums_request() {
|
431 432 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
432 433 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
433 434 |
|
434 435 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
435 436 | let result = client.simple_input_params().set_integer_enum(::std::option::Option::Some(1)).send().await;
|
436 437 | let _ = dbg!(result);
|
437 438 | let http_request = request_receiver.expect_request();
|
438 439 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
439 440 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
440 441 | let required_headers = &["Content-Length"];
|
441 442 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
442 443 | let body = http_request.body().bytes().expect("body should be strict");
|
443 444 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
444 445 | body,
|
445 446 | "Action=SimpleInputParams&Version=2020-01-08&IntegerEnum=1",
|
446 447 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
447 448 | ));
|
448 449 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
449 450 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
450 451 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
451 452 | }
|
452 453 | /// Supports handling NaN float values.
|
453 454 | /// Test ID: AwsQuerySupportsNaNFloatInputs
|
454 455 | #[::tokio::test]
|
455 - | #[allow(unused_mut)]
|
456 + | #[::tracing_test::traced_test]
|
456 457 | async fn aws_query_supports_na_n_float_inputs_request() {
|
457 458 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
458 459 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
459 460 |
|
460 461 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
461 462 | let result = client
|
462 463 | .simple_input_params()
|
463 464 | .set_float_value(::std::option::Option::Some(
|
464 465 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
|
465 466 | ))
|
466 467 | .set_boo(::std::option::Option::Some(
|
467 468 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
|
468 469 | ))
|
469 470 | .send()
|
470 471 | .await;
|
471 472 | let _ = dbg!(result);
|
472 473 | let http_request = request_receiver.expect_request();
|
473 474 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
474 475 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
475 476 | let required_headers = &["Content-Length"];
|
476 477 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
477 478 | let body = http_request.body().bytes().expect("body should be strict");
|
478 479 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
479 480 | body,
|
480 481 | "Action=SimpleInputParams&Version=2020-01-08&FloatValue=NaN&Boo=NaN",
|
481 482 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
482 483 | ));
|
483 484 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
484 485 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
485 486 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
486 487 | }
|
487 488 | /// Supports handling Infinity float values.
|
488 489 | /// Test ID: AwsQuerySupportsInfinityFloatInputs
|
489 490 | #[::tokio::test]
|
490 - | #[allow(unused_mut)]
|
491 + | #[::tracing_test::traced_test]
|
491 492 | async fn aws_query_supports_infinity_float_inputs_request() {
|
492 493 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
493 494 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
494 495 |
|
495 496 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
496 497 | let result = client
|
497 498 | .simple_input_params()
|
498 499 | .set_float_value(::std::option::Option::Some(
|
499 500 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
|
500 501 | ))
|
501 502 | .set_boo(::std::option::Option::Some(
|
502 503 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
|
503 504 | ))
|
504 505 | .send()
|
505 506 | .await;
|
506 507 | let _ = dbg!(result);
|
507 508 | let http_request = request_receiver.expect_request();
|
508 509 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
509 510 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
510 511 | let required_headers = &["Content-Length"];
|
511 512 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
|
512 513 | let body = http_request.body().bytes().expect("body should be strict");
|
513 514 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
514 515 | body,
|
515 516 | "Action=SimpleInputParams&Version=2020-01-08&FloatValue=Infinity&Boo=Infinity",
|
516 517 | ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
|
517 518 | ));
|
518 519 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
519 520 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
520 521 | ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
|
521 522 | }
|
522 523 | /// Supports handling -Infinity float values.
|
523 524 | /// Test ID: AwsQuerySupportsNegativeInfinityFloatInputs
|
524 525 | #[::tokio::test]
|
525 - | #[allow(unused_mut)]
|
526 + | #[::tracing_test::traced_test]
|
526 527 | async fn aws_query_supports_negative_infinity_float_inputs_request() {
|
527 528 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
528 529 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
529 530 |
|
530 531 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
531 532 | let result = client
|
532 533 | .simple_input_params()
|
533 534 | .set_float_value(::std::option::Option::Some(
|
534 535 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
|
535 536 | ))
|