b4e961148f
* Pass the "default" cluster * Mock ECS exceptions more accurately Moto's mock ECS has drifted fairly far from the actual ECS API in terms of which exceptions it throws. This change begins to bring mock ECS's exceptions in line with actual ECS exceptions. Most notably: - Several custom exceptions have been replaced with their real ECS exception. For example, "{0} is not a cluster" has been replaced with ClusterNotFoundException - Tests have been added to verify (most of) these exceptions work correctly. The test coverage was a little spotty to begin with. - The new exceptions plus the change to pass the "default" cluster exposed a lot of places where mock ECS was behaving incorrectly. For example, the ListTasks action is always scoped to a single cluster in ECS but it listed tasks for all clusters in the mock. I've minimally updated the tests to make them pass, but there's lots of opportunity to refactor both this method's test and its implementation. This does not provide full coverage of exceptions. In general, I ran these operations against actual ECS resources and cross-referenced the documentation to figure out what actual exceptions should be thrown and what the messages should be. Consequently, I didn't update any exceptions that took more than trivial amount of time to reproduce with real resources. |
||
---|---|---|
.. | ||
__init__.py | ||
test_ecs_boto3.py | ||
test_ecs_cloudformation.py |