From 1f0016f4db1ce9786695bf0b3ddd4ddfaa50e41e Mon Sep 17 00:00:00 2001 From: Roman Chernykh Date: Wed, 31 Jul 2024 18:32:08 +0500 Subject: [PATCH 1/2] [#274] Fix iam_attach_group_policy function --- src/frostfs_testlib/s3/aws_cli_client.py | 2 +- src/frostfs_testlib/s3/interfaces.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frostfs_testlib/s3/aws_cli_client.py b/src/frostfs_testlib/s3/aws_cli_client.py index ae9254c..8169afe 100644 --- a/src/frostfs_testlib/s3/aws_cli_client.py +++ b/src/frostfs_testlib/s3/aws_cli_client.py @@ -975,7 +975,7 @@ class AwsCliClient(S3ClientWrapper): response = self._to_json(output) assert response.get("Policy"), f"Expected Policy in response:\n{response}" - assert response["Policy"].get("PolicyName") == policy_name, f"PolicyName should be equal to {policy_name}" + assert response["Policy"].get("Arn") == policy_arn, f"PolicyArn should be equal to {policy_arn}" return response diff --git a/src/frostfs_testlib/s3/interfaces.py b/src/frostfs_testlib/s3/interfaces.py index f3793e0..b1825d5 100644 --- a/src/frostfs_testlib/s3/interfaces.py +++ b/src/frostfs_testlib/s3/interfaces.py @@ -408,7 +408,7 @@ class S3ClientWrapper(HumanReadableABC): """Adds the specified user to the specified group""" @abstractmethod - def iam_attach_group_policy(self, group: str, policy_arn: str) -> dict: + def iam_attach_group_policy(self, group_name: str, policy_arn: str) -> dict: """Attaches the specified managed policy to the specified IAM group""" @abstractmethod -- 2.45.2 From 85671af0b56800f6d1ca4cd7f635f8bf0025ae80 Mon Sep 17 00:00:00 2001 From: Roman Chernykh Date: Fri, 2 Aug 2024 17:38:56 +0500 Subject: [PATCH 2/2] [#274] Fix iam_get_policy function --- src/frostfs_testlib/s3/boto3_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frostfs_testlib/s3/boto3_client.py b/src/frostfs_testlib/s3/boto3_client.py index 5686b78..a644a6f 100644 --- a/src/frostfs_testlib/s3/boto3_client.py +++ b/src/frostfs_testlib/s3/boto3_client.py @@ -776,7 +776,7 @@ class Boto3ClientWrapper(S3ClientWrapper): def iam_get_policy(self, policy_arn: str) -> dict: response = self.boto3_iam_client.get_policy(PolicyArn=policy_arn) assert response.get("Policy"), f"Expected Policy in response:\n{response}" - assert response["Policy"].get("PolicyName") == policy_name, f"PolicyName should be equal to {policy_name}" + assert response["Policy"].get("Arn") == policy_arn, f"PolicyArn should be equal to {policy_arn}" return response -- 2.45.2