Skip to content

Commit 7ffce30

Browse files
authored
EMRServerless: add executionRole to GetJobRun response (getmoto#10189)
1 parent 55e2fbc commit 7ffce30

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

moto/emrserverless/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ def __init__(
134134

135135
self.tags = tags
136136

137+
@property
138+
def execution_role(self) -> str:
139+
return self.execution_role_arn
140+
137141

138142
class EMRServerlessBackend(BaseBackend):
139143
"""Implementation of EMRServerless APIs."""

tests/test_emrserverless/test_emrserverless.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,10 @@ def test_get_job_run(self):
776776
assert resp["ResponseMetadata"]["HTTPStatusCode"] == 200
777777
assert resp["jobRun"]["applicationId"] == app_id
778778
assert resp["jobRun"]["jobRunId"] == run_id
779+
assert re.match(
780+
r"arn:(.*?):role/emr-serverless-role",
781+
resp["jobRun"]["executionRole"],
782+
)
779783

780784
def test_invalid_application_id(self):
781785
for _, run_ids in self.job_run_lookup.items():

0 commit comments

Comments
 (0)