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

chore: enable cross-user linux tests in CI #87

Draft
wants to merge 1 commit into
base: mainline
Choose a base branch
from

Conversation

ddneilson
Copy link
Contributor

@ddneilson ddneilson commented Feb 15, 2024

WIP - Trying to figure out what's different about the CI environment; I'm getting unexpected file permissions errors.

What was the problem/requirement? (What/Why)

This library has functionality that allows it to run subprocesses as a user that is different from the current user. We have unit/integration tests that verify this functionality is working. Right now, a developer is expected to run the scripts/run_sudo_tests.sh set of tests before putting up a pull request to make sure that a change doesn't break the functionality. This isn't reliable so we should have these tests enabled in the GitHub CI; this does that.

What was the solution? (How)

These tests are enabled by setting values for certain environment variables. The docker container setup under testing_containers/localuser_sudo_environment/Dockerfile shows these variables, so I just mirrored them in to the CI while also creating the requisite user & sudoers file configuration.

What is the impact of this change?

More confidence in our CI testing.

How was this change tested?

It is tests. Verify the CI test output for the Linux platforms. We should not see any xfail posix-specific tests if this has worked.

Was this change documented?

N/A

Is this a breaking change?

No


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ddneilson ddneilson force-pushed the ddneilson/cross_user_posix_ci branch 15 times, most recently from 9a2e981 to 71b0bd0 Compare February 15, 2024 04:58
Summary:
This library has functionality that allows it to run subprocesses as a user
that is different from the current user. We have unit/integration tests that
verify this functionality is working. Right now, a developer is expected to run
the scripts/run_sudo_tests.sh set of tests before putting up a pull request
to make sure that a change doesn't break the functionality. This isn't reliable
so we should have these tests enabled in the GitHub CI; this does that.

Signed-off-by: Daniel Neilson <53624638+ddneilson@users.noreply.github.com>
Copy link

sonarcloud bot commented May 10, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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.

1 participant