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

Require integration test to be run as sudo/root #4824

Merged
merged 6 commits into from
Dec 22, 2021

Conversation

dereknola
Copy link
Member

Proposed Changes

As discussed in #4372, this rips out all the "sudo" commands within the K3s integration utility functions. It is now required that integration tests have root permissions when run.
Updated documentation on this.

Types of Changes

Test Fix

Verification

As sudo user:
sudo -E env "PATH=$PATH" go test ./pkg/... ./tests/integration/... -run Integration
As root:
go test ./pkg/... ./tests/integration/... -run Integration

Linked Issues

N/A internal testing change only, nothing for QA to do.

User-Facing Change


Further Comments

@dereknola dereknola requested a review from a team as a code owner December 22, 2021 19:12
@dereknola dereknola self-assigned this Dec 22, 2021
tests/util/cmd.go Outdated Show resolved Hide resolved
tests/util/cmd.go Outdated Show resolved Hide resolved
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once Brian's nits are addressed.

@dereknola dereknola merged commit d0f7e23 into k3s-io:master Dec 22, 2021
dereknola added a commit to dereknola/k3s that referenced this pull request Dec 23, 2021
* Remove internal sudo commands from integration tests
* Run integration CI as sudo

Signed-off-by: Derek Nola <[email protected]>
dereknola added a commit that referenced this pull request Jan 3, 2022
* Remove internal sudo commands from integration tests
* Run integration CI as sudo

Signed-off-by: Derek Nola <[email protected]>
@dereknola dereknola deleted the int_sudo_only branch January 3, 2022 17:38
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.

3 participants