Skip to content

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

Open

Description

@apostasie

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

Activity

  1. 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)[/+] on Sep 22, 2024
  2. added
    bug
    area/ci
    and removed
    kind/unconfirmed-bug-claim
    on Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cibug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions