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.