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

tests: replace nfs support test with generalized cifs test #14562

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zyga
Copy link
Contributor

@zyga zyga commented Oct 1, 2024

The cifs test was created relatively recently to test how a single home directory is mounted using CIFS and how a user using that home directory can use snaps. We had an earlier test for NFS with some more fragile and complex setup.

Given that NFS test fails periodically and it was broken for a while on some systems, replace the old NFS test with a variant of the CIFS test. Most of the existing test is kept intact. The portion that manages the user account is moved to the front to be easily shared with the conditional bits below.

The patch series contains a new toy executable called okfail which indicates that a command is allowed to fail without consequences. It should be moved to the test helpers project but it can be done on the next sync.

Jira: https://warthogs.atlassian.net/browse/SNAPDENG-31425

Signed-off-by: Zygmunt Krynicki <[email protected]>
This test is much more modern and easier to reason about. It is also somewhat different
in that it doesn't really exericse all the various configurations where nfs/cifs is detected,
that is handled with unit tests (and we know the detection part is relatively weak).

Instead the test focuses that a given user may be "remote home" and that the special
permissions work as expected.

Signed-off-by: Zygmunt Krynicki <[email protected]>
This test is now replaced by generalized cifs-support test. Not as many systems are covered
but the test is much more robust and easier to work with.

Signed-off-by: Zygmunt Krynicki <[email protected]>
Signed-off-by: Zygmunt Krynicki <[email protected]>
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.87%. Comparing base (ac897ee) to head (82ad131).
Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14562      +/-   ##
==========================================
+ Coverage   78.85%   78.87%   +0.01%     
==========================================
  Files        1079     1082       +3     
  Lines      145615   146045     +430     
==========================================
+ Hits       114828   115192     +364     
- Misses      23601    23655      +54     
- Partials     7186     7198      +12     
Flag Coverage Δ
unittests 78.87% <ø> (+0.01%) ⬆️

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.

@zyga zyga marked this pull request as ready for review October 1, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant