diff --git a/tests/conftest.py b/tests/conftest.py index 2eecc6b..839de50 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,6 @@ pytest_plugins = [ "command", "root", - "systemd_vault", + "systemd_vaultd", "tempdir", ] diff --git a/tests/systemd_vault.py b/tests/systemd_vaultd.py similarity index 70% rename from tests/systemd_vault.py rename to tests/systemd_vaultd.py index b350879..74e594b 100644 --- a/tests/systemd_vault.py +++ b/tests/systemd_vaultd.py @@ -10,14 +10,14 @@ BIN: Optional[Path] = None @pytest.fixture -def systemd_vault(project_root: Path) -> Path: +def systemd_vaultd(project_root: Path) -> Path: global BIN if BIN: return BIN - bin = os.environ.get("SYSTEMD_VAULT_BIN") + bin = os.environ.get("SYSTEMD_VAULTD_BIN") if bin: BIN = Path(bin) return BIN run(["go", "build", str(project_root)]) - BIN = project_root / "systemd-vault" + BIN = project_root / "systemd-vaultd" return BIN diff --git a/tests/test_service.py b/tests/test_service.py index a6bdb66..fc36a73 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -29,7 +29,7 @@ def random_service(secrets_dir: Path) -> Service: def test_socket_activation( - systemd_vault: Path, command: Command, tempdir: Path + systemd_vaultd: Path, command: Command, tempdir: Path ) -> None: secrets_dir = tempdir / "secrets" secrets_dir.mkdir() @@ -40,7 +40,7 @@ def test_socket_activation( "systemd-socket-activate", "--listen", str(sock), - str(systemd_vault), + str(systemd_vaultd), "-secrets", str(secrets_dir), "-sock", @@ -75,10 +75,10 @@ def test_socket_activation( assert out.returncode == 0 -def test_blocking_secret(systemd_vault: Path, command: Command, tempdir: Path) -> None: +def test_blocking_secret(systemd_vaultd: Path, command: Command, tempdir: Path) -> None: secrets_dir = tempdir / "secrets" sock = tempdir / "sock" - command.run([str(systemd_vault), "-secrets", str(secrets_dir), "-sock", str(sock)]) + command.run([str(systemd_vaultd), "-secrets", str(secrets_dir), "-sock", str(sock)]) while not sock.exists(): time.sleep(0.1)