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

chore: run ingest tests with coverage in local test script #355

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

stephenkilbourn
Copy link
Contributor

Issue

#348

What?

The run-local-tests.sh script runs the integration tests. This adds a run of the ingest api unit tests and generates a coverage report

Why?

  • Instead of just manually documenting the existing tests, it would be beneficial to see what the current coverage level of those tests are and determine which areas should have more coverage.

Current baseline: 55% coverage
Output from running ./scripts/run-local-tests.sh

==================================================================================== test session starts ====================================================================================
platform darwin -- Python 3.9.9, pytest-7.4.4, pluggy-1.4.0 -- /Users/stephenkilbourn/.pyenv/versions/3.9.9/bin/python
cachedir: .pytest_cache
rootdir: /Users/stephenkilbourn/e84/veda/veda-backend
plugins: cov-5.0.0, anyio-4.3.0, time-machine-2.14.0
collected 6 items

.github/workflows/tests/test_raster.py::test_raster_api PASSED
.github/workflows/tests/test_raster.py::test_mosaic_api PASSED
.github/workflows/tests/test_raster.py::test_mosaic_search PASSED
.github/workflows/tests/test_raster.py::test_item PASSED
.github/workflows/tests/test_stac.py::test_stac_api PASSED
.github/workflows/tests/test_stac.py::test_stac_to_raster PASSED

===================================================================================== 6 passed in 7.34s =====================================================================================
==================================================================================== test session starts ====================================================================================
platform darwin -- Python 3.9.9, pytest-7.4.4, pluggy-1.4.0 -- /Users/stephenkilbourn/.pyenv/versions/3.9.9/bin/python
cachedir: .pytest_cache
rootdir: /Users/stephenkilbourn/e84/veda/veda-backend
plugins: cov-5.0.0, anyio-4.3.0, time-machine-2.14.0
collected 2 items

ingest_api/runtime/tests/test_registration.py::TestList::test_simple_lookup PASSED
ingest_api/runtime/tests/test_registration.py::TestList::test_next_response PASSED

---------- coverage: platform darwin, python 3.9.9-final-0 -----------
Name                                             Stmts   Miss  Cover
--------------------------------------------------------------------
ingest_api/runtime/src/__init__.py                   0      0   100%
ingest_api/runtime/src/auth.py                      51     30    41%
ingest_api/runtime/src/collection_publisher.py      23     12    48%
ingest_api/runtime/src/config.py                    19      1    95%
ingest_api/runtime/src/dependencies.py              18      6    67%
ingest_api/runtime/src/doc.py                        1      0   100%
ingest_api/runtime/src/ingestor.py                  47     47     0%
ingest_api/runtime/src/main.py                      70     29    59%
ingest_api/runtime/src/schema_helpers.py            28      8    71%
ingest_api/runtime/src/schemas.py                  121     27    78%
ingest_api/runtime/src/services.py                  25      7    72%
ingest_api/runtime/src/utils.py                     41     17    59%
ingest_api/runtime/src/validators.py                45     33    27%
ingest_api/runtime/src/vedaloader.py                20     13    35%
--------------------------------------------------------------------
TOTAL                                              509    230    55%


===================================================================================== 2 passed in 3.04s =====================================================================================
Tests passed, no need to collect logs.
Removing test stack...

Testing?

  • Relevant testing details

@stephenkilbourn stephenkilbourn merged commit 94fdc2c into develop Apr 22, 2024
4 checks passed
@stephenkilbourn stephenkilbourn deleted the chore/add-cov-script branch April 22, 2024 22:51
botanical added a commit that referenced this pull request May 6, 2024
### Breaking
- #356

#### Breaking changes notes
Breaking: `VEDA_COGNITO_DOMAIN` configuration now required along with
one time administrator step to update existing user pool client allowed
callback urls with the ingest-api's URL

### Added
- #342
- #330
- #323

### Changed/Updated
- #355
- #340

### Fixed

1. - #367
2. - #365
3. - #361
4. - #360
5. - #358
8. - #345
9. - #344
12. - #339
13. - #338
14. - #337
15. - #335
16. - #334
17. - #331
20. - #329
21. - #327
22. - #326
23. - #325
24. - #324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants