3 ms·
Sure, if you use a separate bucket for your teat instances, and reset it between tests. This can probably work with more complex services too.
by theamk 6y ago
Sure, if you use a separate bucket for your teat instances, and reset it between tests.
This can probably work with more complex services too.
- jrochkind1 6y agoto avoid conflict between two entities running tests at once (say via CI), I guess it would need to use Amazon API to construct the bucket and tear it down around each test? But I'm not sure that would comply with the requirements, they seem to forbid running against external services at all, no? '"calling out to a few hard-to-run external services" doesn't count.'
- theamk 6y agoYep, to use AWS S3, you'll need a lock to ensure a single job at a time, or create buckets programmatically for each test. I think every team needs to decide how much to follow the original advice, there is certainly a balance between simulating external service locally (with possible associated behavior changes) or using an external service. If you do want to run everything locally, there are servers which offer S3 API, like "minio" and "fake_s3". Probably would be very nice for localhost operation. But if you need a complex thing like Transcoder this is not going to work.