Skip to content

tests: Add integration tests#157

Merged
mmarseu merged 42 commits intomainfrom
148-add-integration-tests
Aug 8, 2024
Merged

tests: Add integration tests#157
mmarseu merged 42 commits intomainfrom
148-add-integration-tests

Conversation

@mmarseu
Copy link
Copy Markdown
Collaborator

@mmarseu mmarseu commented Apr 11, 2024

This PR primarily adds integration testing to test the tool's functionality from a "outside" perspective.
These tests invoke the main function directly so they are about as abstract as can be.

The goal is to ensure that the kind of internal redesign as is planned for #7 will not create any regressions. Existing unit tests are not fit for this because they are so tightly coupled to the design that they, too, will have to be reworked, creating the risk of regressions inside the tests.

Tests for the following commands are implemented:

  • amend
  • build-public
  • merge
  • set
  • validate

Not to be implemented:

A few minor additional changes

  • Disable E704 for flake because it conflicts with black
  • Disable bandit on tests because it makes more trouble than it is worth
  • Fix an issue in test_customreports.py because I couldn't be bothered to create a separate PR for this. See commit message on 05906d1 for details. If you insist, we can still separate this out.
  • Fix a bug that made the --version-range CLI option to the set command not work.

@mmarseu mmarseu added this to the 1.0.0 milestone Apr 11, 2024
@mmarseu mmarseu requested review from CBeck-96 and italvi April 11, 2024 07:34
@mmarseu mmarseu self-assigned this Apr 11, 2024
@mmarseu mmarseu linked an issue Apr 11, 2024 that may be closed by this pull request
@mmarseu mmarseu changed the title Add integration tests test: Add integration tests Apr 11, 2024
@mmarseu mmarseu changed the title test: Add integration tests tests: Add integration tests Apr 11, 2024
@mmarseu mmarseu force-pushed the 148-add-integration-tests branch 2 times, most recently from f47e3b6 to dea5f59 Compare May 28, 2024 13:05
@github-actions github-actions bot added the enhancement New feature or request label May 28, 2024
@mmarseu mmarseu force-pushed the 148-add-integration-tests branch from 8b3e0a1 to 7ce1b8b Compare June 20, 2024 14:07
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jun 20, 2024
@mmarseu mmarseu force-pushed the 148-add-integration-tests branch 3 times, most recently from c876a67 to e94e179 Compare July 4, 2024 06:48
@mmarseu mmarseu force-pushed the 148-add-integration-tests branch 2 times, most recently from 9e48720 to e6e525c Compare July 10, 2024 09:02
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Jul 10, 2024
mmarseu added 3 commits August 8, 2024 09:01
test_customreports.py creates issues.json in the working directory.
This commit makes it so any files are created in temporary directories
and deleted after the tests are done.
@mmarseu mmarseu force-pushed the 148-add-integration-tests branch from de15402 to 37b4a8f Compare August 8, 2024 07:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 8, 2024

Coverage

Coverage Report •
FileStmtsMissCoverMissing
__main__.py3231695%217–218, 235, 245, 670, 713, 758, 763, 767, 789, 803, 807, 811, 813, 822, 832
error.py230100% 
log.py55198%36
set.py1832089%56–59, 78–86, 88–89, 91–94, 105
validator
   customreports.py85989%46–47, 54–57, 97, 149–150
   validate.py96396%118, 134, 169
TOTAL16887195% 

Tests Skipped Failures Errors Time
349 2 💤 0 ❌ 0 🔥 10.586s ⏱️

@mmarseu mmarseu marked this pull request as ready for review August 8, 2024 07:12
Copy link
Copy Markdown
Collaborator

@italvi italvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmarseu some small things, the most "critical" one is the missing license in the header of the new *.py-files 😁

Comment thread .flake8
Comment thread tests/integration/__init__.py
Comment thread tests/integration/conftest.py
Comment thread tests/integration/helper.py
Comment thread tests/integration/test_integration.py
Comment thread cdxev/set.py Outdated
Comment thread cdxev/set.py
Comment thread tests/test_customreports.py
Comment thread tests/integration/helper.py Outdated
@mmarseu mmarseu merged commit 668b9f2 into main Aug 8, 2024
@mmarseu mmarseu deleted the 148-add-integration-tests branch August 8, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration tests

2 participants