You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let expected = expected.split('&').collect::<HashSet<&str>>();
23
+
let actual = actual.split('&').collect::<HashSet<&str>>();
24
+
assert_eq!(expected, actual);
25
+
}
26
+
22
27
/// See https://github.com/awslabs/aws-sdk-rust/issues/391
23
28
///
24
29
/// EC2 replies with `<nextToken></nextToken>` which our XML parser parses as empty string and not "none"
25
30
#[tokio::test]
26
31
asyncfnpaginators_handle_empty_tokens(){
27
-
let request= "Action=DescribeSpotPriceHistory&Version=2016-11-15&AvailabilityZone=eu-north-1a&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX";
28
32
let response = r#"<?xml version="1.0" encoding="UTF-8"?>
let first_item = paginator.try_next().await.expect("success");
55
54
assert_eq!(first_item,None);
56
-
http_client.assert_requests_match(&[]);
55
+
let req = captured_request.expect_request();
56
+
let actual_body = std::str::from_utf8(req.body().bytes().unwrap()).unwrap();
57
+
let expected_body = "Action=DescribeSpotPriceHistory&Version=2016-11-15&AvailabilityZone=eu-north-1a&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX";
/// See https://github.com/awslabs/aws-sdk-rust/issues/405
60
62
///
61
63
/// EC2 can also reply with the token truly unset which will be interpreted as `None`
62
64
#[tokio::test]
63
65
asyncfnpaginators_handle_unset_tokens(){
64
-
let request= "Action=DescribeSpotPriceHistory&Version=2016-11-15&AvailabilityZone=eu-north-1a&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX";
65
66
let response = r#"<?xml version="1.0" encoding="UTF-8"?>
let first_item = paginator.try_next().await.expect("success");
91
87
assert_eq!(first_item,None);
92
-
http_client.assert_requests_match(&[]);
88
+
let req = captured_request.expect_request();
89
+
let actual_body = std::str::from_utf8(req.body().bytes().unwrap()).unwrap();
90
+
let expected_body = "Action=DescribeSpotPriceHistory&Version=2016-11-15&AvailabilityZone=eu-north-1a&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX";
0 commit comments