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

PR: Complete Unit Test cleanup/parametrization/coverage increases #1787

Merged
merged 21 commits into from
Oct 1, 2023

Conversation

bigtedde
Copy link
Collaborator

Description

Putting the finishing touches on the unit test folder. Some remaining code cleanup, parametrization, and additional tests where needed.

Related Issue

#1754

Motivation and Context

One of my Google Summer of Code projects involves cleaning up the Vorta tests, reducing duplicated code, and increasing code coverage.

How Has This Been Tested?

Locally, and passes the automated Github test workflow.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

@bigtedde bigtedde marked this pull request as draft August 29, 2023 21:07
@@ -198,8 +198,7 @@ def create_ssh_key(self):
ssh_add_window = SSHAddWindow()
self._window = ssh_add_window # For tests
ssh_add_window.setParent(self, QtCore.Qt.WindowType.Sheet)
ssh_add_window.accepted.connect(self.init_ssh)
# ssh_add_window.rejected.connect(lambda: self.sshComboBox.setCurrentIndex(0))
ssh_add_window.rejected.connect(self.init_ssh)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes a bug I found during testing. Before, the SSH Key selector was not repopulating with new keys until Vorta was restarted. Now, it will repopulate whenever the user closes ssh_add_window

@bigtedde
Copy link
Collaborator Author

bigtedde commented Sep 29, 2023

@m3nu @real-yfprojects with these additional tests, coverage now sits at 80% 🎉

Marking as ready for review 👍

pytest --cov=vorta --cov-report term-missing

Screenshot 2023-09-28 at 4 40 07 PM

@bigtedde bigtedde marked this pull request as ready for review September 29, 2023 00:06
@m3nu m3nu merged commit 60f9fc2 into borgbase:master Oct 1, 2023
@bigtedde bigtedde deleted the tests branch October 5, 2023 16:05
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