Skip to content

Add Unit Tests for acm_certificates_expiration_check#300

Open
prajwal-choudhari-comprinno wants to merge 3 commits intocomprinnotech:testcases_devfrom
prajwal-choudhari-comprinno:test_acm_certificates_expiration_check
Open

Add Unit Tests for acm_certificates_expiration_check#300
prajwal-choudhari-comprinno wants to merge 3 commits intocomprinnotech:testcases_devfrom
prajwal-choudhari-comprinno:test_acm_certificates_expiration_check

Conversation

@prajwal-choudhari-comprinno

Context

Adding unit test coverage for the acm_certificates_expiration_check implemented under library/aws/checks/acm/.
This ensures correctness across various ACM certificate states (expired, expiring soon, valid, no certificates, and errors).

Description

  • Created test_acm_certificates_expiration_check.py in library/aws/tests/acm/

  • Test cases added:

    • No ACM certificates
    • Expired certificate
    • Certificate expiring in less than 7 days
    • Valid certificate (more than 7 days remaining)
    • Error while describing certificate
    • Error while listing certificates

Dependencies:

  • Relies on pytest and unittest.mock
  • No external AWS resources required due to mocking

Checklist

License

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



@pytest.fixture
def test_metadata():
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix naming conventions

Choose a reason for hiding this comment

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

corrected

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