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

Dont require gpg pass when running tests (BugFix) #843

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

kissiel
Copy link
Contributor

@kissiel kissiel commented Nov 24, 2023

Description

Previously when the tests run, if the host had a GPG key in its databse that was protected by a password, the operator was asked to provide the password. This was due to subprocess.call not being mocked properly in the provider_manager tests.

Tests

The test module is what gets fixed here.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1c854ed) 35.38% compared to head (2e67421) 35.38%.
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #843   +/-   ##
=======================================
  Coverage   35.38%   35.38%           
=======================================
  Files         303      303           
  Lines       34239    34239           
  Branches     5917     5917           
=======================================
  Hits        12114    12114           
  Misses      21559    21559           
  Partials      566      566           
Flag Coverage Δ
checkbox-ng 61.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Previously when the tests run, if the host had a GPG key in its databse
that was protected by a password, the operator was asked to provide the
password. This was due to subprocess.call not being mocked properly in
the provider_manager tests.

This patch adds the mocking.
@kissiel kissiel force-pushed the dont-require-gpg-pass-when-running-tests branch from d8a69d8 to 2e67421 Compare November 24, 2023 22:46
Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

+1, ty for investigating this!

@kissiel kissiel merged commit c7a63a1 into main Nov 27, 2023
17 checks passed
@kissiel kissiel deleted the dont-require-gpg-pass-when-running-tests branch November 27, 2023 20:25
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
properly mock subprocess calls in test_provider_manager

Previously when the tests run, if the host had a GPG key in its databse
that was protected by a password, the operator was asked to provide the
password. This was due to subprocess.call not being mocked properly in
the provider_manager tests.

This patch adds the mocking.
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