[autobackport: sssd-2-9] tests: Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more#8478
Conversation
There was a problem hiding this comment.
Code Review
The pull request correctly addresses the issue of less and more commands failing in a non-TTY environment by replacing them with ls and cat. The changes are consistent across the test setup, steps, expected results, and the actual test logic. The fix improves the reliability of the test case without altering its core purpose of checking case-insensitive sudo rule merging.
… of less/more test_sudo__case_sensitive_false runs sudo via su -c (no TTY). less and more exit non-zero without a terminal, so the test failed. Switched to /bin/ls and /bin/cat so the run is non-interactive; the test still checks case-insensitive sudo rule merging for user-1 and USER-1. Assisted-by: Cursor (Composer-1.5) Signed-off-by: Madhuri Upadhye <[email protected]> Reviewed-by: Alexey Tikhonov <[email protected]> Reviewed-by: Shridhar Gadekar <[email protected]> (cherry picked from commit 2cdaaa4)
|
The pull request was accepted by @shridhargadekar with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
ed6e291 to
4926bcb
Compare
This is an automatic backport of PR#8449 tests: Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more to branch sssd-2-9, created by @madhuriupadhye.
Please make sure this backport is correct.
Note
The commits were cherry-picked without conflicts.
You can push changes to this pull request
Original commits
2cdaaa4 - Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more
Backported commits
Original Pull Request Body
test_sudo__case_sensitive_false runs sudo via su -c (no TTY). less and more exit
non-zero without a terminal, so the test failed. Switched to /bin/ls and /bin/cat
so the run is non-interactive; the test still checks case-insensitive sudo rule
merging for user-1 and USER-1.
Assisted-by: Cursor (Composer-1.5)