MaxSessionDuration should be included in the list_roles response (#3750)

This commit is contained in:
Jon Michaelchuck 2021-03-10 00:49:50 -08:00 committed by GitHub
commit a4009e7bd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -4052,6 +4052,17 @@ def test_list_roles_without_description():
conn.list_roles().get("Roles")[0].should_not.have.key("Description")
@mock_iam()
def test_list_roles_includes_max_session_duration():
conn = boto3.client("iam", region_name="us-east-1")
conn.create_role(
RoleName="my-role", AssumeRolePolicyDocument="some policy",
)
# Ensure the MaxSessionDuration is included in the role listing
conn.list_roles().get("Roles")[0].should.have.key("MaxSessionDuration")
@mock_iam()
def test_create_user_with_tags():
conn = boto3.client("iam", region_name="us-east-1")