Changed mock_ecs to support ecs.run_task calls with a default cluster
This commit is contained in:
parent
452e63977e
commit
0163eb6a9d
2 changed files with 69 additions and 1 deletions
|
|
@ -604,7 +604,10 @@ class EC2ContainerServiceBackend(BaseBackend):
|
|||
raise Exception("{0} is not a task_definition".format(task_definition_name))
|
||||
|
||||
def run_task(self, cluster_str, task_definition_str, count, overrides, started_by):
|
||||
cluster_name = cluster_str.split("/")[-1]
|
||||
if cluster_str:
|
||||
cluster_name = cluster_str.split("/")[-1]
|
||||
else:
|
||||
cluster_name = "default"
|
||||
if cluster_name in self.clusters:
|
||||
cluster = self.clusters[cluster_name]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue