mrówa
mrówa

Reputation: 5771

How to test AWS Batch boto3/moto mocks without running docker

moto currently allows for very powerful tests by emulating Lambda, Batch and other services through Docker. One con of this is requirement for availability of docker and slow tests (single submit_job test with docker runs in around 2 seconds).

Is there a way to ignore docker when running moto mocks and shim/stub docker support by answering "This job is submitted"?

Upvotes: 2

Views: 1195

Answers (1)

Bert Blommers
Bert Blommers

Reputation: 2123

Moto maintainer here. There is no build-in way for moto to run those services without docker atm.

It sounds like a useful feature though, so if you feel like it, PR's are always welcome.

Edit on 20/09/2022: As of Moto 3.1.8, you can use @batch_simple to mock the Batch service without running Docker in the background. See http://docs.getmoto.org/en/latest/docs/services/batch.html

Upvotes: 4

Related Questions