Skip to content

Add unit tests for apigateway_restapi_logging_enabled check#303

Open
prajwal-choudhari-comprinno wants to merge 33 commits intocomprinnotech:testcases_devfrom
prajwal-choudhari-comprinno:test_apigateway_restapi_logging_enabled
Open

Add unit tests for apigateway_restapi_logging_enabled check#303
prajwal-choudhari-comprinno wants to merge 33 commits intocomprinnotech:testcases_devfrom
prajwal-choudhari-comprinno:test_apigateway_restapi_logging_enabled

Conversation

@prajwal-choudhari-comprinno

Description

This PR adds comprehensive unit tests for the apigateway_restapi_logging_enabled security check. The tests cover scenarios including:

  • No REST APIs present (expecting SKIPPED status)
  • REST APIs with logging enabled (expecting PASSED status)
  • REST APIs with logging disabled (expecting FAILED status)
  • Handling of AWS ClientError exceptions (expecting UNKNOWN status)

The added tests use mocks to simulate the AWS API Gateway client behavior and verify the correctness of the check's reporting logic.

Checklist

  • Added new test cases for API Gateway REST API logging check
  • Code covered by tests
  • Documentation follows Google Python Style Guide
  • Considered if backporting is needed

License

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

abhay-pai-comprinno and others added 30 commits February 3, 2025 12:08
feat: checks refactored and updated
Dev to Main: (feat: masked access key IDs in report summaries)
…ion-create-github-pages-documentation-for-tevico-community

76 documentation create GitHub pages documentation for tevico community
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.

4 participants