test: remove anonymous volumes with short-lived test containers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobias KaupatandClaude Sonnet 5.5 committed 2026-10-19 16:13:44 +02:00
1 parent a74b210615
commit 8ff93f4709
3 files changed
+29 -8

No files matched your search

+4 -4
View File
@@ -19,7 +19,7 @@ from types import SimpleNamespace
import docker
import pytest
from conftest import LABELS
from helpers import Container
from helpers import Container, run_once
HELLO = "backup me"
PRE_BACKUP_HOOK = '#!/bin/sh\necho "PRE-HOOK-RAN"\n'
@@ -409,10 +409,10 @@ class TimezoneRunner:
image: str
def zone(self, env: dict[str, str] | None = None) -> str:
out = self.client.containers.run(
self.image, entrypoint=["date", "+%Z"], environment=env, remove=True, labels=LABELS
out = run_once(
self.client, self.image, entrypoint=["date", "+%Z"], environment=env, labels=LABELS
)
return out.decode().strip()
return out.strip()
@pytest.fixture(scope="module")