ecs.run_task count default to 1 (#3268)

This commit is contained in:
Peter Baumgartner 2022-02-28 05:38:45 -07:00 committed by GitHub
parent b3bc419843
commit 8bbfe9c151
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class EC2ContainerServiceResponse(BaseResponse):
cluster_str = self._get_param("cluster", "default")
overrides = self._get_param("overrides")
task_definition_str = self._get_param("taskDefinition")
count = self._get_int_param("count")
count = self._get_int_param("count", 1)
started_by = self._get_param("startedBy")
tags = self._get_param("tags")
launch_type = self._get_param("launchType")

View File

@ -1590,6 +1590,13 @@ def test_run_task():
}
],
)
response = client.run_task(
cluster="test_ecs_cluster",
overrides={},
taskDefinition="test_ecs_task",
startedBy="moto",
)
len(response["tasks"]).should.equal(1)
response = client.run_task(
cluster="test_ecs_cluster",
overrides={},