diff --git a/.gitignore b/.gitignore index d1b5b0a80..901ccb43b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,5 @@ tests/file.tmp *.tmp .venv/ htmlcov/ -.~c9_* \ No newline at end of file +.~c9_* +.coverage* diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index 2ce48a22b..a8dfb7957 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -1858,7 +1858,7 @@ ## emr
-40% implemented +42% implemented - [ ] add_instance_fleet - [X] add_instance_groups @@ -1871,7 +1871,7 @@ - [X] delete_security_configuration - [ ] delete_studio - [ ] delete_studio_session_mapping -- [ ] describe_cluster +- [X] describe_cluster - [X] describe_job_flows - [ ] describe_notebook_execution - [ ] describe_release_label diff --git a/moto/emr/models.py b/moto/emr/models.py index 85cb6918c..1167dd24f 100644 --- a/moto/emr/models.py +++ b/moto/emr/models.py @@ -414,7 +414,7 @@ class ElasticMapReduceBackend(BaseBackend): return ec2_backends[self.region_name] def add_applications(self, cluster_id, applications): - cluster = self.get_cluster(cluster_id) + cluster = self.describe_cluster(cluster_id) cluster.add_applications(applications) def add_instance_groups(self, cluster_id, instance_groups): @@ -444,7 +444,7 @@ class ElasticMapReduceBackend(BaseBackend): return steps def add_tags(self, cluster_id, tags): - cluster = self.get_cluster(cluster_id) + cluster = self.describe_cluster(cluster_id) cluster.add_tags(tags) def describe_job_flows( @@ -479,7 +479,7 @@ class ElasticMapReduceBackend(BaseBackend): if step.id == step_id: return step - def get_cluster(self, cluster_id): + def describe_cluster(self, cluster_id): if cluster_id in self.clusters: return self.clusters[cluster_id] raise EmrError("ResourceNotFoundException", "", "error_json") @@ -578,7 +578,7 @@ class ElasticMapReduceBackend(BaseBackend): return result_groups def remove_tags(self, cluster_id, tag_keys): - cluster = self.get_cluster(cluster_id) + cluster = self.describe_cluster(cluster_id) cluster.remove_tags(tag_keys) def _manage_security_groups( diff --git a/moto/emr/responses.py b/moto/emr/responses.py index b41e476fd..e1421b1a5 100644 --- a/moto/emr/responses.py +++ b/moto/emr/responses.py @@ -128,7 +128,7 @@ class ElasticMapReduceResponse(BaseResponse): @generate_boto3_response("DescribeCluster") def describe_cluster(self): cluster_id = self._get_param("ClusterId") - cluster = self.backend.get_cluster(cluster_id) + cluster = self.backend.describe_cluster(cluster_id) template = self.response_template(DESCRIBE_CLUSTER_TEMPLATE) return template.render(cluster=cluster) @@ -528,7 +528,7 @@ class ElasticMapReduceResponse(BaseResponse): @generate_boto3_response("PutAutoScalingPolicy") def put_auto_scaling_policy(self): cluster_id = self._get_param("ClusterId") - cluster = self.backend.get_cluster(cluster_id) + cluster = self.backend.describe_cluster(cluster_id) instance_group_id = self._get_param("InstanceGroupId") auto_scaling_policy = self._get_param("AutoScalingPolicy") instance_group = self.backend.put_auto_scaling_policy(