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(tests): Fix check for full name in test_run_crash_anonymity #171

Merged
merged 3 commits into from Apr 27, 2023

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Apr 21, 2023

The value pw_gecos contains a comma separated list where the first element might be the full user name. Split the first element from pw_gecos (if it is not empty) to check that the full name is not in the crash report.

The property names are easier to read than the index numbers of the
`pwd.getpwuid` response.
@bdrung bdrung requested a review from schopin-pro April 21, 2023 09:50
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #171 (d484b40) into main (9aa1cc6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #171   +/-   ##
=======================================
  Coverage   82.28%   82.28%           
=======================================
  Files          91       91           
  Lines       18367    18370    +3     
=======================================
+ Hits        15113    15116    +3     
  Misses       3254     3254           
Impacted Files Coverage Δ
tests/integration/test_ui.py 97.43% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
The value `pw_gecos` contains a comma separated list where the first
element might be the full user name. Split the first element from
`pw_gecos` (if it is not empty) to check that the full name is not in
the crash report.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Copy link
Contributor

@schopin-pro schopin-pro left a comment

Choose a reason for hiding this comment

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

LGTM.

Methinks you went a bit overboard with the fine commits though. The first one could have been folded into the _get_sensitive_strings() introductory one ;)

@schopin-pro schopin-pro merged commit 26bfe0e into canonical:main Apr 27, 2023
24 checks passed
@bdrung bdrung deleted the anonymity branch April 27, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants