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

Tests that require not-rootless are getting skipped with target=docker (where the cli is not run as root) #3453

Open
apostasie opened this issue Sep 22, 2024 · 0 comments
Labels
area/ci e.g., CI failure bug Something isn't working

Comments

@apostasie
Copy link
Contributor

Description

rootlessutil.IsRootless will (appropriately) return true if we are not root - but then, the docker daemon may run rootful, and at least some of these tests should definitely run for docker as well.

While the CI is running with -exec sudo - running locally without sudo will skip tests and give the developer the false impression it is fine.

eg:

go test -v  ./cmd/nerdctl/container/ -run TestRunWithOOMScoreAdj -test.target docker
go test -v  -exec sudo ./cmd/nerdctl/container/ -run TestRunWithOOMScoreAdj -test.target docker

Should likely yield the same results.

Pretty sure there are side-effects to consider here, as not being root will prevent us from writing certain files on the host for example, so, we should not change that on the legacy tooling - but we should account for that in the tooling rewrite.

Steps to reproduce the issue

na

Describe the results you received and expected

na

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@apostasie apostasie added the kind/unconfirmed-bug-claim Unconfirmed bug claim label Sep 22, 2024
@apostasie apostasie changed the title Tests that require not-rootless are getting skipped with docker-cli non-root Tests that require not-rootless are getting skipped with target=docker (where the cli is not run as root) Sep 22, 2024
@apostasie apostasie mentioned this issue Sep 22, 2024
3 tasks
@AkihiroSuda AkihiroSuda added bug Something isn't working area/ci e.g., CI failure and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci e.g., CI failure bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants