Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firehose: Add Snowflake Destination #8122

Merged

Conversation

sp-bdanies
Copy link
Contributor

@sp-bdanies sp-bdanies commented Sep 13, 2024

So far we cannot use moto to test Firehose Service with the Snowflake destination

Example:

@pytest.fixture(autouse=True, scope="class")
    def firehose_client_inst(self):
        with mock_aws():
            firehose_client = boto3.client("firehose", region_name="eu-west-1")

            for firehose_stream_name in FIREHOSE_STREAM_NAMES:
                firehose_client.create_delivery_stream(
                    DeliveryStreamName=firehose_stream_name,
                    SnowflakeDestinationConfiguration={
                        "RoleARN": f"arn:aws:iam::{DEFAULT_ACCOUNT_ID}:role/firehose_delivery_role",
                        "AccountUrl": "fake-account.eu-west-1.snowflakecomputing.com",
                        "Database": "myDatabase",
                        "Schema": "mySchema",
                        "Table": "myTable",
                        "S3BackupMode": "FailedDataOnly",
                        "S3Configuration": {
                            "RoleARN": f"arn:aws:iam::{DEFAULT_ACCOUNT_ID}:role/firehose_delivery_role",
                            "BucketARN": "arn:aws:s3:::kinesis-test"
                        }
                    }
                )

            yield firehose_client

Output error:

botocore.errorfactory.InvalidArgumentException: An error occurred (InvalidArgumentException) when calling the CreateDeliveryStream operation: Exactly one destination configuration is supported for a Firehose

Tests OK on my project if I modify Moto lib locally.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.47%. Comparing base (45114d2) to head (1c05032).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8122   +/-   ##
=======================================
  Coverage   94.47%   94.47%           
=======================================
  Files        1141     1141           
  Lines       98313    98313           
=======================================
  Hits        92881    92881           
  Misses       5432     5432           
Flag Coverage Δ
servertests 28.94% <ø> (ø)
unittests 94.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - welcome to Moto @sp-bdanies, and thank you for contributing!

@bblommers bblommers added this to the 5.0.15 milestone Sep 14, 2024
@bblommers bblommers merged commit ca14870 into getmoto:master Sep 14, 2024
51 checks passed
Copy link
Contributor

This is now part of moto >= 5.0.15.dev13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants