Loading aws/sdk/aws-models/s3-tests.smithy +18 −0 Original line number Diff line number Diff line Loading @@ -72,3 +72,21 @@ apply PutBucketLifecycleConfiguration @httpRequestTests([ } } ]) apply CreateMultipartUpload @httpRequestTests([ { id: "CreateMultipartUploadUriConstruction", documentation: "This test validates that the URI for CreateMultipartUpload is created correctly", method: "POST", protocol: "aws.protocols#restXml", uri: "/test-bucket/object.txt", queryParams: [ "uploads", "x-id=CreateMultipartUpload" ], params: { "Bucket": "test-bucket", "Key": "object.txt" } } ]) rust-runtime/smithy-http/src/query.rs +10 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ impl<'a> Writer<'a> { #[cfg(test)] mod test { use crate::query::fmt_string; use crate::query::{fmt_string, Writer}; #[test] fn url_encode() { Loading @@ -71,4 +71,13 @@ mod test { // `:` needs to be encoded, but only for AWS services assert_eq!(fmt_string("a:b"), "a%3Ab") } #[test] fn writer_sets_prefix_properly() { let mut out = String::new(); let mut writer = Writer::new(&mut out); writer.push_v("a"); writer.push_kv("b", "c"); assert_eq!(out, "?a&b=c"); } } Loading
aws/sdk/aws-models/s3-tests.smithy +18 −0 Original line number Diff line number Diff line Loading @@ -72,3 +72,21 @@ apply PutBucketLifecycleConfiguration @httpRequestTests([ } } ]) apply CreateMultipartUpload @httpRequestTests([ { id: "CreateMultipartUploadUriConstruction", documentation: "This test validates that the URI for CreateMultipartUpload is created correctly", method: "POST", protocol: "aws.protocols#restXml", uri: "/test-bucket/object.txt", queryParams: [ "uploads", "x-id=CreateMultipartUpload" ], params: { "Bucket": "test-bucket", "Key": "object.txt" } } ])
rust-runtime/smithy-http/src/query.rs +10 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ impl<'a> Writer<'a> { #[cfg(test)] mod test { use crate::query::fmt_string; use crate::query::{fmt_string, Writer}; #[test] fn url_encode() { Loading @@ -71,4 +71,13 @@ mod test { // `:` needs to be encoded, but only for AWS services assert_eq!(fmt_string("a:b"), "a%3Ab") } #[test] fn writer_sets_prefix_properly() { let mut out = String::new(); let mut writer = Writer::new(&mut out); writer.push_v("a"); writer.push_kv("b", "c"); assert_eq!(out, "?a&b=c"); } }