Skip to content

Conversation

@Ninad-Lunge-Comprinno
Copy link

Context

This PR adds a test suite for the dynamodb_tables_pitr_enabled check to validate that the check behaves correctly in different scenarios — such as when no tables exist, when PITR is enabled/disabled, and when exceptions occur.

Description

  • Added unit tests using botocore.stub.Stubber to simulate AWS DynamoDB responses.

  • Covered scenarios:

    • No DynamoDB tables present.
    • All tables have PITR enabled.
    • Some tables have PITR disabled.
    • Exception occurs while fetching PITR status.
    • Exception occurs while listing tables.
  • Introduced a DummySession to mock boto3 sessions for injection.

No new dependencies were introduced. The test cases help ensure the check's robustness across failure modes and typical AWS configurations.

Checklist

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Ninad-Lunge-Comprinno Ninad-Lunge-Comprinno changed the base branch from main to testcases_dev July 10, 2025 18:21
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.

1 participant