|
|
@ -29,7 +29,7 @@ def random_service(secrets_dir: Path) -> Service:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_socket_activation(
|
|
|
|
def test_socket_activation(
|
|
|
|
systemd_vault: Path, command: Command, tempdir: Path
|
|
|
|
systemd_vaultd: Path, command: Command, tempdir: Path
|
|
|
|
) -> None:
|
|
|
|
) -> None:
|
|
|
|
secrets_dir = tempdir / "secrets"
|
|
|
|
secrets_dir = tempdir / "secrets"
|
|
|
|
secrets_dir.mkdir()
|
|
|
|
secrets_dir.mkdir()
|
|
|
@ -40,7 +40,7 @@ def test_socket_activation(
|
|
|
|
"systemd-socket-activate",
|
|
|
|
"systemd-socket-activate",
|
|
|
|
"--listen",
|
|
|
|
"--listen",
|
|
|
|
str(sock),
|
|
|
|
str(sock),
|
|
|
|
str(systemd_vault),
|
|
|
|
str(systemd_vaultd),
|
|
|
|
"-secrets",
|
|
|
|
"-secrets",
|
|
|
|
str(secrets_dir),
|
|
|
|
str(secrets_dir),
|
|
|
|
"-sock",
|
|
|
|
"-sock",
|
|
|
@ -75,10 +75,10 @@ def test_socket_activation(
|
|
|
|
assert out.returncode == 0
|
|
|
|
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"
|
|
|
|
secrets_dir = tempdir / "secrets"
|
|
|
|
sock = tempdir / "sock"
|
|
|
|
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():
|
|
|
|
while not sock.exists():
|
|
|
|
time.sleep(0.1)
|
|
|
|
time.sleep(0.1)
|
|
|
|