Skip to content

Commit 22d3e7c

Browse files
authored
Merge pull request #1248 from jakob-keller/running-tests-docs
consolidate documentation on running tests
2 parents 9647083 + 3cebe6b commit 22d3e7c

File tree

2 files changed

+19
-34
lines changed

2 files changed

+19
-34
lines changed

CONTRIBUTING.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,25 @@ Install pre-commit hooks::
3131

3232
$ pre-commit install
3333

34-
Congratulations, you are ready to run the test suite::
34+
Congratulations, you are ready to run the test suite.
35+
36+
There are two set of tests, those that can be mocked through `moto <https://github.com/getmoto/moto>`_ running in docker, and those that require running against a personal amazon key. The CI only runs the moto tests.
37+
38+
To run the moto tests::
39+
40+
$ make mototest
41+
42+
To run the non-moto tests, make sure you have your amazon key and secret accessible via environment variables::
43+
44+
$ export AWS_ACCESS_KEY_ID=xxx
45+
$ export AWS_SECRET_ACCESS_KEY=xxx
46+
$ export AWS_DEFAULT_REGION=xxx # e.g. us-west-2
47+
48+
Execute full tests suite::
49+
50+
$ make test
51+
52+
Execute full tests suite with coverage::
3553

3654
$ make cov
3755

README.rst

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -163,39 +163,6 @@ stick ``await`` in front of methods to make them async, e.g. ``await client.list
163163

164164
If a service is not listed here and you could do with some tests or examples feel free to raise an issue.
165165

166-
Run Tests
167-
---------
168-
169-
There are two set of tests, those that can be mocked through `moto <https://github.com/getmoto/moto>`_ running in docker, and those that require running against a personal amazon key. The CI only runs the moto tests.
170-
171-
To run the moto tests:
172-
173-
::
174-
175-
$ make mototest
176-
177-
To run the non-moto tests:
178-
179-
Make sure you have development requirements installed and your amazon key and
180-
secret accessible via environment variables:
181-
182-
::
183-
184-
$ pip install pip-tools
185-
$ pip-compile --all-extras pyproject.toml
186-
$ pip-sync
187-
$ pip install -e ".[awscli,boto3]"
188-
$ export AWS_ACCESS_KEY_ID=xxx
189-
$ export AWS_SECRET_ACCESS_KEY=xxx
190-
$ export AWS_DEFAULT_REGION=xxx # e.g. us-west-2
191-
192-
Execute tests suite:
193-
194-
::
195-
196-
$ make test
197-
198-
199166

200167
Enable type checking and code completion
201168
----------------------------------------

0 commit comments

Comments
 (0)