Skip to content

SQS unit tests - faking data #1040

Answered by ymwjbxxq
ymwjbxxq asked this question in Q&A
Discussion options

You must be logged in to vote

I made it

let sqs =   http::Request::builder()
           .header("content-type", "application/x-amz-json-1.0")
            .uri(http::uri::Uri::from_static(
                "https://sqs.eu-central-1.amazonaws.com/",
            ));
 let request = request
            .body(SdkBody::from(
                r#"{
                  "QueueUrl":"some-sqs",
                  "MessageBody":"{\"slug\":\"slug\",\"brand\":\"brand\"}"
                }"#,
            ))?;

let response = Response::builder()
            .status(200)
            .body(SdkBody::from(
                r#"
<SendMessageResponse>
    <SendMessageResult>
        <MD5OfMessageBody>fafb00f5732ab283681e124bf8747ed1</MD5OfMessageBo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ymwjbxxq
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant