Unverified Commit 2fa2a0e9 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files
parent 60f45cca
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -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"
        }
    }
])
+10 −1
Original line number Diff line number Diff line
@@ -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() {
@@ -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");
    }
}