Skip to content

Commit

Permalink
Merge pull request #1248 from jakob-keller/running-tests-docs
Browse files Browse the repository at this point in the history
consolidate documentation on running tests
  • Loading branch information
jakob-keller authored Jan 6, 2025
2 parents 9647083 + 3cebe6b commit 22d3e7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 34 deletions.
20 changes: 19 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,25 @@ Install pre-commit hooks::

$ pre-commit install

Congratulations, you are ready to run the test suite::
Congratulations, you are ready to run the test suite.

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.

To run the moto tests::

$ make mototest

To run the non-moto tests, make sure you have your amazon key and secret accessible via environment variables::

$ export AWS_ACCESS_KEY_ID=xxx
$ export AWS_SECRET_ACCESS_KEY=xxx
$ export AWS_DEFAULT_REGION=xxx # e.g. us-west-2

Execute full tests suite::

$ make test

Execute full tests suite with coverage::

$ make cov

Expand Down
33 changes: 0 additions & 33 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,39 +163,6 @@ stick ``await`` in front of methods to make them async, e.g. ``await client.list

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

Run Tests
---------

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.

To run the moto tests:

::

$ make mototest

To run the non-moto tests:

Make sure you have development requirements installed and your amazon key and
secret accessible via environment variables:

::

$ pip install pip-tools
$ pip-compile --all-extras pyproject.toml
$ pip-sync
$ pip install -e ".[awscli,boto3]"
$ export AWS_ACCESS_KEY_ID=xxx
$ export AWS_SECRET_ACCESS_KEY=xxx
$ export AWS_DEFAULT_REGION=xxx # e.g. us-west-2

Execute tests suite:

::

$ make test



Enable type checking and code completion
----------------------------------------
Expand Down

0 comments on commit 22d3e7c

Please sign in to comment.