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

Crucible service unit test coverage #146

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dbutenhof
Copy link
Collaborator

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

This brings unit test coverage of the Crucible service up to 50%. I'm pushing it mostly for archival purposes before the holiday break.

Related Tickets & Documents

PANDA-678 crucible service unit test coverage

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

tox -e unit -- -vv (the -- -vv adds full diffs on failure for test debugging, and is optional)

Coverage is reported inline in text summary form, and also generates a detailed HTML report in the local /var/tmp/${USER}/html/ which can be viewed in the browser to find holes.

This encapsulates substantial logic to encapsulate interpretation of the
Crucible Common Data Model OpenSearch schema for the use of CPT dashboard API
components. By itself, it does nothing.
This uses `black`, `isort` and `flake8` to check code quality, although
failure is ignored until we've cleaned it up (which has begin in
PR cloud-bulldozer#139 against the `revamp` branch).

Minimal unit testing is introduced, generating a code coverage report.
The text summary is added to the Action summary page, and the more
detailed HTML report is stored as an artifact for download.

NOTE: The GitHub Action environment is unhappy with `uvicorn` 0.15;
upgrading to the latest 0.32.x seems to work and hasn't obviously
broken anything else.
This is a draft to archive what I've done before I evaporate for the rest of
2024, because, you know, I could get run over by a reindeer or something...

This brings crucible service test coverage to 50%.
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.

1 participant