Skip to content

Commit

Permalink
fix unit tests calling boto3
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasu77df committed Oct 25, 2024
1 parent ef0a5c3 commit fe9dac9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_capture_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def ecr_extractor(mock_boto3_session):
return EcrImageMetadataExtractor('123456789012.dkr.ecr.us-east-1.amazonaws.com/test-repo:latest', 'us-east-1')


def test_parse_ecr_image():
def test_parse_ecr_image(ecr_extractor):
ecr_extractor.account = '123456789012'
ecr_extractor.registry = '123456789012.dkr.ecr.us-east-1.amazonaws.com'
ecr_extractor.ecr_image_name = 'test-repo'
ecr_extractor.tag = "latest"
extractor = EcrImageMetadataExtractor(
'123456789012.dkr.ecr.us-east-1.amazonaws.com/test-repo:latest', 'us-east-1')
assert extractor.account == '123456789012'
Expand Down

0 comments on commit fe9dac9

Please sign in to comment.