Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate documentation on running tests #1248

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading