chore: enable cross-user linux tests in CI #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.