Skip to content

Cloudfront unit tests - fake details #530

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

You must be logged in to vote

the "no root element" sound is an XML issue

From there, I have found this:
https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateInvalidation.html

The syntax for the unit tests is:

[cfg(test)]
mod tests {
    use super::*;
    use aws_sdk_cloudfront::{Client, Config, Credentials, Region};
    use aws_smithy_client::{test_connection::TestConnection, erase::DynConnector};
    use aws_smithy_http::body::SdkBody;
    use lambda_http::Context;
    use my_app::error::ApplicationError;

    async fn get_mock_config() -> aws_sdk_cloudfront::Config {
        let cfg = aws_config::from_env()
            .region(Region::new("eu-central-1"))
            .credentials_provider(Credential…

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