211 211 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
212 212 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
213 213 | })?;
|
214 214 | cfg.interceptor_state()
|
215 215 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
216 216 | ::std::result::Result::Ok(())
|
217 217 | }
|
218 218 | }
|
219 219 | #[allow(unreachable_code, unused_variables)]
|
220 220 | #[cfg(test)]
|
221 - | mod xml_timestamps_request_test {
|
221 + | mod xml_timestamps_test {
|
222 + |
|
222 223 | /// Tests how normal timestamps are serialized
|
223 224 | /// Test ID: XmlTimestamps
|
224 225 | #[::tokio::test]
|
225 - | #[allow(unused_mut)]
|
226 + | #[::tracing_test::traced_test]
|
226 227 | async fn xml_timestamps_request() {
|
227 228 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
228 229 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
229 230 |
|
230 231 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
231 232 | let result = client
|
232 233 | .xml_timestamps()
|
233 234 | .set_normal(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
234 235 | 1398796238, 0_f64,
|
235 236 | )))
|
236 237 | .send()
|
237 238 | .await;
|
238 239 | let _ = dbg!(result);
|
239 240 | let http_request = request_receiver.expect_request();
|
240 241 | let expected_headers = [("Content-Type", "application/xml")];
|
241 242 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
242 243 | let body = http_request.body().bytes().expect("body should be strict");
|
243 244 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
244 245 | body,
|
245 246 | "<XmlTimestampsRequest>\n <normal>2014-04-29T18:30:38Z</normal>\n</XmlTimestampsRequest>\n",
|
246 247 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
247 248 | ));
|
248 249 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
249 250 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
250 251 | ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
|
251 252 | }
|
252 253 | /// Ensures that the timestampFormat of date-time works like normal timestamps
|
253 254 | /// Test ID: XmlTimestampsWithDateTimeFormat
|
254 255 | #[::tokio::test]
|
255 - | #[allow(unused_mut)]
|
256 + | #[::tracing_test::traced_test]
|
256 257 | async fn xml_timestamps_with_date_time_format_request() {
|
257 258 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
258 259 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
259 260 |
|
260 261 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
261 262 | let result = client
|
262 263 | .xml_timestamps()
|
263 264 | .set_date_time(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
264 265 | 1398796238, 0_f64,
|
265 266 | )))
|
266 267 | .send()
|
267 268 | .await;
|
268 269 | let _ = dbg!(result);
|
269 270 | let http_request = request_receiver.expect_request();
|
270 271 | let expected_headers = [("Content-Type", "application/xml")];
|
271 272 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
272 273 | let body = http_request.body().bytes().expect("body should be strict");
|
273 274 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
274 275 | body,
|
275 276 | "<XmlTimestampsRequest>\n <dateTime>2014-04-29T18:30:38Z</dateTime>\n</XmlTimestampsRequest>\n",
|
276 277 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
277 278 | ));
|
278 279 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
279 280 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
280 281 | ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
|
281 282 | }
|
282 283 | /// Ensures that the timestampFormat of date-time on the target shape works like normal timestamps
|
283 284 | /// Test ID: XmlTimestampsWithDateTimeOnTargetFormat
|
284 285 | #[::tokio::test]
|
285 - | #[allow(unused_mut)]
|
286 + | #[::tracing_test::traced_test]
|
286 287 | async fn xml_timestamps_with_date_time_on_target_format_request() {
|
287 288 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
288 289 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
289 290 |
|
290 291 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
291 292 | let result = client
|
292 293 | .xml_timestamps()
|
293 294 | .set_date_time_on_target(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
294 295 | 1398796238, 0_f64,
|
295 296 | )))
|
296 297 | .send()
|
297 298 | .await;
|
298 299 | let _ = dbg!(result);
|
299 300 | let http_request = request_receiver.expect_request();
|
300 301 | let expected_headers = [("Content-Type", "application/xml")];
|
301 302 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_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 | "<XmlTimestampsRequest>\n <dateTimeOnTarget>2014-04-29T18:30:38Z</dateTimeOnTarget>\n</XmlTimestampsRequest>\n",
|
306 307 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
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(), "/XmlTimestamps", "path was incorrect");
|
311 312 | }
|
312 313 | /// Ensures that the timestampFormat of epoch-seconds works
|
313 314 | /// Test ID: XmlTimestampsWithEpochSecondsFormat
|
314 315 | #[::tokio::test]
|
315 - | #[allow(unused_mut)]
|
316 + | #[::tracing_test::traced_test]
|
316 317 | async fn xml_timestamps_with_epoch_seconds_format_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
|
322 323 | .xml_timestamps()
|
323 324 | .set_epoch_seconds(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
324 325 | 1398796238, 0_f64,
|
325 326 | )))
|
326 327 | .send()
|
327 328 | .await;
|
328 329 | let _ = dbg!(result);
|
329 330 | let http_request = request_receiver.expect_request();
|
330 331 | let expected_headers = [("Content-Type", "application/xml")];
|
331 332 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
332 333 | let body = http_request.body().bytes().expect("body should be strict");
|
333 334 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
334 335 | body,
|
335 336 | "<XmlTimestampsRequest>\n <epochSeconds>1398796238</epochSeconds>\n</XmlTimestampsRequest>\n",
|
336 337 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
337 338 | ));
|
338 339 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
339 340 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
340 341 | ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
|
341 342 | }
|
342 343 | /// Ensures that the timestampFormat of epoch-seconds on the target shape works
|
343 344 | /// Test ID: XmlTimestampsWithEpochSecondsOnTargetFormat
|
344 345 | #[::tokio::test]
|
345 - | #[allow(unused_mut)]
|
346 + | #[::tracing_test::traced_test]
|
346 347 | async fn xml_timestamps_with_epoch_seconds_on_target_format_request() {
|
347 348 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
348 349 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
349 350 |
|
350 351 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
351 352 | let result = client
|
352 353 | .xml_timestamps()
|
353 354 | .set_epoch_seconds_on_target(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
354 355 | 1398796238, 0_f64,
|
355 356 | )))
|
356 357 | .send()
|
357 358 | .await;
|
358 359 | let _ = dbg!(result);
|
359 360 | let http_request = request_receiver.expect_request();
|
360 361 | let expected_headers = [("Content-Type", "application/xml")];
|
361 362 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
362 363 | let body = http_request.body().bytes().expect("body should be strict");
|
363 364 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
364 365 | body,
|
365 366 | "<XmlTimestampsRequest>\n <epochSecondsOnTarget>1398796238</epochSecondsOnTarget>\n</XmlTimestampsRequest>\n",
|
366 367 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
367 368 | ));
|
368 369 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
369 370 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
370 371 | ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
|
371 372 | }
|
372 373 | /// Ensures that the timestampFormat of http-date works
|
373 374 | /// Test ID: XmlTimestampsWithHttpDateFormat
|
374 375 | #[::tokio::test]
|
375 - | #[allow(unused_mut)]
|
376 + | #[::tracing_test::traced_test]
|
376 377 | async fn xml_timestamps_with_http_date_format_request() {
|
377 378 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
378 379 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
379 380 |
|
380 381 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
381 382 | let result = client
|
382 383 | .xml_timestamps()
|
383 384 | .set_http_date(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
384 385 | 1398796238, 0_f64,
|
385 386 | )))
|
386 387 | .send()
|
387 388 | .await;
|
388 389 | let _ = dbg!(result);
|
389 390 | let http_request = request_receiver.expect_request();
|
390 391 | let expected_headers = [("Content-Type", "application/xml")];
|
391 392 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
392 393 | let body = http_request.body().bytes().expect("body should be strict");
|
393 394 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
394 395 | body,
|
395 396 | "<XmlTimestampsRequest>\n <httpDate>Tue, 29 Apr 2014 18:30:38 GMT</httpDate>\n</XmlTimestampsRequest>\n",
|
396 397 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
397 398 | ));
|
398 399 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
399 400 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
400 401 | ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
|
401 402 | }
|
402 403 | /// Ensures that the timestampFormat of http-date on the target shape works
|
403 404 | /// Test ID: XmlTimestampsWithHttpDateOnTargetFormat
|
404 405 | #[::tokio::test]
|
405 - | #[allow(unused_mut)]
|
406 + | #[::tracing_test::traced_test]
|
406 407 | async fn xml_timestamps_with_http_date_on_target_format_request() {
|
407 408 | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
408 409 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
409 410 |
|
410 411 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
411 412 | let result = client
|
412 413 | .xml_timestamps()
|
413 414 | .set_http_date_on_target(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
414 415 | 1398796238, 0_f64,
|
415 416 | )))
|
416 417 | .send()
|
417 418 | .await;
|
418 419 | let _ = dbg!(result);
|
419 420 | let http_request = request_receiver.expect_request();
|
420 421 | let expected_headers = [("Content-Type", "application/xml")];
|
421 422 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
422 423 | let body = http_request.body().bytes().expect("body should be strict");
|
423 424 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|
424 425 | body,
|
425 426 | "<XmlTimestampsRequest>\n <httpDateOnTarget>Tue, 29 Apr 2014 18:30:38 GMT</httpDateOnTarget>\n</XmlTimestampsRequest>\n",
|
426 427 | ::aws_smithy_protocol_test::MediaType::from("application/xml"),
|
427 428 | ));
|
428 429 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
429 430 | ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
|
430 431 | ::pretty_assertions::assert_eq!(uri.path(), "/XmlTimestamps", "path was incorrect");
|
431 432 | }
|
432 433 | /// Tests how normal timestamps are serialized
|
433 434 | /// Test ID: XmlTimestamps
|
434 435 | #[::tokio::test]
|
435 - | #[allow(unused_mut)]
|
436 + | #[::tracing_test::traced_test]
|
436 437 | async fn xml_timestamps_response() {
|
437 438 | let expected_output = crate::operation::xml_timestamps::XmlTimestampsOutput::builder()
|
438 439 | .set_normal(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
|
439 440 | 1398796238, 0_f64,
|
440 441 | )))
|
441 442 | .build();
|
442 443 | let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
|
443 444 | ::http::response::Builder::new()
|
444 445 | .header("Content-Type", "application/xml")
|
445 446 | .status(200)
|