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

fix mocks in tests for remote_session_assistant (BugFix) #896

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

kissiel
Copy link
Contributor

@kissiel kissiel commented Dec 14, 2023

Description

This PR fixes 3 unittests that assumed the test will be run on a typical Ubuntu box, which LP builders are clearly not.

Tests

To test it I've recreated the conditions on LP, meaning I "removed" sudo and made the guess_normal_user always raise the exception.

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (582d483) 36.54% compared to head (60964f0) 36.56%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #896      +/-   ##
==========================================
+ Coverage   36.54%   36.56%   +0.02%     
==========================================
  Files         310      310              
  Lines       34634    34634              
  Branches     5964     5964              
==========================================
+ Hits        12656    12664       +8     
+ Misses      21408    21400       -8     
  Partials      570      570              
Flag Coverage Δ
checkbox-ng 62.64% <ø> (+0.05%) ⬆️

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.

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, WOA ty so much for adding so many tests (and for the fix)

@kissiel kissiel merged commit 493a95a into main Dec 14, 2023
17 checks passed
@kissiel kissiel deleted the fix-remote-unit-tests branch December 14, 2023 11:39
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Jan 9, 2024
* fix mocks in tests for remote_session_assistant

* add unittests for is_passwordless_sudo
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
* fix mocks in tests for remote_session_assistant

* add unittests for is_passwordless_sudo
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