Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

CI: run virtcontainers unit tests only as root#219

Merged
sboeuf merged 1 commit intokata-containers:masterfrom
chavafg:topic/unit-test
Apr 6, 2018
Merged

CI: run virtcontainers unit tests only as root#219
sboeuf merged 1 commit intokata-containers:masterfrom
chavafg:topic/unit-test

Conversation

@chavafg
Copy link
Copy Markdown
Contributor

@chavafg chavafg commented Apr 5, 2018

Virtcontainers unit tests only work if they are executed
using the root user.

Fixes #218.

Depends-on: github.com/kata-containers/runtime#193

Signed-off-by: Salvador Fuentes salvador.fuentes@intel.com

@chavafg chavafg added the review label Apr 5, 2018
@chavafg chavafg requested a review from jodh-intel April 5, 2018 23:13
Copy link
Copy Markdown
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

If we can maybe do a touch of investigation to pinpoint why the tests need to be run as root, and if we think there is a way we could improve that in the future then open an issue to cover that shortcoming - then...
lgtm

printf "INFO: Running 'go test' as %s user on package '%s' with flags '%s'\n" \
"$user" "$pkg" "$go_test_flags"

# Run virtcontainers tests only if user is root.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Which is a little sad, but iirc it is because the vc tests need to install the cni plugins etc., which has to be done as root?
I wonder if the better fix is to ensure we sudo all the bits in the vc test setup so we can still run the tests?

@chavafg chavafg force-pushed the topic/unit-test branch 2 times, most recently from f75a9ab to 4740095 Compare April 6, 2018 15:15
@chavafg chavafg force-pushed the topic/unit-test branch 3 times, most recently from d678f8c to 39394d6 Compare April 6, 2018 17:55
Virtcontainers unit tests only work if they are executed
using the root user.

Fixes kata-containers#218.

Depends-on: github.com/kata-containers/runtime#193

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
@sboeuf
Copy link
Copy Markdown

sboeuf commented Apr 6, 2018

LGTM

Approved with PullApprove

@sboeuf sboeuf merged commit b82f5cf into kata-containers:master Apr 6, 2018
jcvenegas pushed a commit to jcvenegas/kata-test that referenced this pull request Apr 13, 2018
CI: run virtcontainers unit tests only as root
@chavafg chavafg deleted the topic/unit-test branch May 31, 2018 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants