Skip to content

Commit

Permalink
change initialize_s3_client to initialize_client
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 committed Mar 6, 2025
1 parent 31f899f commit d82f4f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/module_utils/s3clientmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, connection) -> None:
self.connection = connection
self._s3_client = None

def initialize_s3_client(self, region_name: str, endpoint_url: str, profile_name: str) -> None:
def initialize_client(self, region_name: str, endpoint_url: str, profile_name: str) -> None:
"""
Create the S3 client inside the manager.
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/plugins/connection/aws_ssm/test_aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,17 @@ class TestS3ClientManager:
"ansible_collections.community.aws.plugins.connection.aws_ssm.S3ClientManager.get_boto_client",
return_value="mocked_s3_client",
)
def test_initialize_s3_client(self, mock_get_boto_client):
def test_initialize_client(self, mock_get_boto_client):
"""
Test initialize_s3_client()
Test initialize_client()
"""
pc = PlayContext()
new_stdin = StringIO()
conn = connection_loader.get("community.aws.aws_ssm", pc, new_stdin)

s3_client_manager = S3ClientManager(connection=conn)

s3_client_manager.initialize_s3_client(
s3_client_manager.initialize_client(
region_name="us-east-2", endpoint_url="https://mock-endpoint", profile_name="test-profile"
)

Expand Down

0 comments on commit d82f4f8

Please sign in to comment.