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: cargo test for non-root users #635

Merged
merged 3 commits into from
Mar 1, 2024

Commits on Mar 1, 2024

  1. fix: add system_info module to utils

    Add `system_info` module to `utils` containing
    functions that gather information from current
    user
    
    Signed-off-by: Miguel Martín <mmartinv@redhat.com>
    mmartinv committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    fc1f751 View commit details
    Browse the repository at this point in the history
  2. fix: do not run tests that require root

    Do not run tests that require root. The tests requiring superuser
    privileges are marked as ignored and will display a message on how
    to actually run those tests:
    ```
    [root@localhost]# cargo test -- --ignored
    ```
    
    An additional test is added to check that the effective user name
    is actually root before trying to run the commands.
    
    Signed-off-by: Miguel Martín <mmartinv@redhat.com>
    mmartinv committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    d7f7f25 View commit details
    Browse the repository at this point in the history
  3. fix: use system_info mod functions to gather the current user name

    Use `system_info` mod functions to gather the current user name.
    
    Signed-off-by: Miguel Martín <mmartinv@redhat.com>
    mmartinv committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    76c7773 View commit details
    Browse the repository at this point in the history