Fix import of stat_triplet
Some checks failed
CI / test (push) Successful in 49s
CI / test (almalinux, docker.io/library/almalinux:9, python3.11) (push) Failing after 9m3s
CI / test (debian, docker.io/library/debian:13, python3) (push) Failing after 12m13s
Lint / test (push) Successful in 46s

This commit is contained in:
Miguel Jacq 2026-06-29 14:51:32 +10:00
parent 3c1e08bdde
commit b546bb9bf2
Signed by: mig5
GPG key ID: 03906B4110AAD3B8
3 changed files with 16 additions and 9 deletions

View file

@ -10,6 +10,7 @@ from enroll.platform import PlatformInfo
from enroll.systemd import UnitInfo
from enroll.pathfilter import PathFilter
import enroll.capture as capture
from enroll.harvest_collectors import paths as path_collectors
from enroll.capture import (
capture_file as _capture_file,
capture_link as _capture_link,
@ -255,7 +256,7 @@ def test_harvest_dedup_manual_packages_and_builds_etc_custom(
# /usr/local/bin/readme.txt remains non-executable
return ("root", "root", "0644")
monkeypatch.setattr(harvest, "stat_triplet", fake_stat_triplet)
monkeypatch.setattr(path_collectors, "stat_triplet", fake_stat_triplet)
monkeypatch.setattr(harvest, "stat_dir_triplet", fake_stat_triplet)
monkeypatch.setattr(capture, "stat_triplet", fake_stat_triplet)
@ -400,7 +401,9 @@ def test_shared_cron_snippet_prefers_matching_role_over_lexicographic(
)
monkeypatch.setattr(harvest, "get_backend", lambda info=None: backend)
monkeypatch.setattr(harvest, "stat_triplet", lambda p: ("root", "root", "0644"))
monkeypatch.setattr(
path_collectors, "stat_triplet", lambda p: ("root", "root", "0644")
)
monkeypatch.setattr(harvest, "stat_dir_triplet", lambda p: ("root", "root", "0755"))
monkeypatch.setattr(capture, "stat_triplet", lambda p: ("root", "root", "0644"))
monkeypatch.setattr(harvest, "collect_non_system_users", lambda: [])