From a624f3d87ac00944bc612633c7e287c5f4fe5874 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 22 Oct 2024 07:03:26 +0200 Subject: [PATCH 1/2] tasks: Fix image cache in local podman container These days we have to explicitly set `$COCKPIT_IMAGES_DATA_DIR`. Drop the explicit "bash" command, it's not necessary any more. --- tasks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/README.md b/tasks/README.md index 024b4a3c..2e357439 100644 --- a/tasks/README.md +++ b/tasks/README.md @@ -123,7 +123,7 @@ container like this: ```sh podman run -it --rm --device=/dev/kvm --memory=6g --pids-limit=4096 --shm-size=256m \ --security-opt label=disable -v ~/.cache/cockpit-images:/cache/images \ - -e TEST_JOBS=2 ghcr.io/cockpit-project/tasks bash + -e COCKPIT_IMAGES_DATA_DIR=/cache/images -e TEST_JOBS=2 ghcr.io/cockpit-project/tasks ``` Inside, you can then run a test, for example From 8179fe8f5ec5ed2c0bc1909555b8bf2745ed8ff6 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 22 Oct 2024 07:16:55 +0200 Subject: [PATCH 2/2] pyproject: Disable two pytest ruff rules Different ruff versions have contradicting opinions about how to write the pytest decorators. Writing them with () as we do now is more general, so let's keep it that way. --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index fac4ffcb..33461e94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,3 +62,7 @@ select = [ "W", # warnings (mostly whitespace) "YTT", # flake8-2020 ] + +ignore = [ + "PT001", "PT023", # different versions can't make up their mind how to write decorators +]