moto icon indicating copy to clipboard operation
moto copied to clipboard

Techdebt: allow test & lint to run for specific service

Open hans-d opened this issue 2 years ago • 5 comments

make test SERVICE_NAME=s3

hans-d avatar Mar 07 '23 08:03 hans-d

While I appreciate the spirit of this PR, I think it's too big of a change and too much of a future maintenance hassle for the benefits. Locally testing just the service you've worked on is already quite simple, e.g. pytest -sv ./tests/test_redshift. (A simply note in the development docs could make this more clear.)

make lint takes a lot longer than it used to, but it's still not that onerous, considering you really only need to run it once at the end of your local development.

Happy to consider better arguments for the need here, but I'm not currently in support of this.

bpandola avatar Mar 08 '23 18:03 bpandola

The tagging of resources comes into play, eg when not just wanting to run all cloudformation tests in the tests_cloudformation folder, but also related test in other folders (or for sns, lambda, ....)

A similar list for the services already needs to be maintained for the dependencies. We can piggyback on that re checking for completeness / use the an additional check that also validates that this list dependency list is complete (not re the dependencies added, but at least having an entry present).

hans-d avatar Mar 08 '23 22:03 hans-d

@bpandola The first commit was simpler (https://github.com/getmoto/moto/pull/6024/commits/02b516c74b0da8f59e75fd9321a5e6ec87f03890). A change like that would be a nice QOL-improvement IMO, to run lint/test on a specific folder.

Agree that having another explicit list of services is too much of a hassle.

bblommers avatar Mar 08 '23 22:03 bblommers

shall I revert to the first one?

hans-d avatar Mar 08 '23 22:03 hans-d

Yes, let's, @hans-d, I think that's better.

bblommers avatar Mar 09 '23 20:03 bblommers