Skip to content
Merged
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: 17 additions & 3 deletions tests/README.MD
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# Tests

## Pre-reqs
Make sure you have `pytest` and `pydantic` installed:
`pip install pytest pydantic`

Make sure you have venv activated:

```bash
source ../venv/bin/activate
```

Make sure you have the required dev dependencies installed:

```bash
python3 -m pip install -r ../requirements-dev.txt
```

We assume that your green-metrics-tool is already set up to work on your machine, as it will use your local config.yml
file to determine which metric providers can be utilized in the tests.

## First time setup

run:

`python3 setup-test-env.py`
Expand All @@ -18,6 +31,7 @@ You will need to re-run this setup script if new metric providers are added or t
significant way.

## Running

To run the tests, you need to first start the test containers, then run pytest, and afterwards stop the containers.
There are a few scripts to make this easy.

Expand All @@ -33,4 +47,4 @@ window run the pytest suite using `pytest`, and then stop the containers when yo
Running a subset of tests using pytest is better explained within the documentation here:
https://docs.pytest.org/en/7.2.x/how-to/usage.html

You can also do everything in one command using the `./run-tests.sh` script.
You can also do everything in one command using the `./run-tests.sh` script.