← Back to issue list

Integration test for poetry plugin requires root/apt state (not marked, fails locally)

View original Github issue

Metadata

Project
craft-parts
Number
#1470
Type
issue
State
open
Author
gcomneno
Labels
Created
2026-02-22 19:52:39+00:00
Updated
2026-02-22 19:52:39+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Summary `tests/integration/plugins/test_poetry.py::test_poetry_plugin[...]` fails when run as a regular user because it triggers apt operations. ### Observed failure Error includes `BuildPackagesNotInstalled` and log lines like "Packages list not refreshed, not running as superuser". ### Why it happens The test appears to run `apt-get update/install` (or otherwise requires refreshed package lists / build deps installation), which typically needs root privileges and/or a CI image prepared in advance. ### Question / intended behavior Is this test expected to run only in privileged CI environments? If so, is there a recommended way to run the integration suite locally (documentation / flags / markers) that I might have missed? ### Suggested direction If the intent is "privileged only", one option could be to mark it (e.g. `@pytest.mark.requires_root`) and/or skip gracefully when not root / when apt state is not available. ### Local workaround Skip the test file, or run only non-privileged tests.

Evaluation history

No evaluation history available.