mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-28 10:45:50 +00:00
Add unit tests for ExtractRoleNameFromArn and ExtractRoleNameFromPrincipal to verify support for both AWS standard and legacy IAM role ARN formats: TestExtractRoleNameFromArn (14 test cases): - Legacy format without account ID: arn:aws:iam::role/RoleName - Standard format with account ID: arn:aws:iam::ACCOUNT:role/RoleName - With role paths: arn:aws:iam::role/Path/RoleName - Invalid ARNs and edge cases TestExtractRoleNameFromPrincipal (11 test cases): - STS assumed role format (legacy and standard) - IAM role format (legacy and standard) - With and without account ID - Invalid principals and edge cases All tests pass with 100% coverage for both functions.