comment out work in progress test
parent
4851891755
commit
a0199ef2ba
@ -1,39 +1,39 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from command import Command, run
|
# from command import Command, run
|
||||||
from pathlib import Path
|
# from pathlib import Path
|
||||||
|
|
||||||
def test_blocking_secret(
|
# def test_blocking_secret(
|
||||||
systemd_vaultd: Path, command: Command, tempdir: Path
|
# systemd_vaultd: Path, command: Command, tempdir: Path
|
||||||
) -> None:
|
# ) -> None:
|
||||||
secrets_dir = tempdir / "secrets"
|
# secrets_dir = tempdir / "secrets"
|
||||||
command.run(["vault", "server", "-dev"])
|
# command.run(["vault", "server", "-dev"])
|
||||||
#sock = tempdir / "sock"
|
# sock = tempdir / "sock"
|
||||||
#command.run([str(systemd_vaultd), "-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)
|
||||||
|
|
||||||
#service = random_service(secrets_dir)
|
# service = random_service(secrets_dir)
|
||||||
|
|
||||||
#proc = command.run(
|
# proc = command.run(
|
||||||
# [
|
# [
|
||||||
# "systemd-run",
|
# "systemd-run",
|
||||||
# "-u",
|
# "-u",
|
||||||
# service.name,
|
# service.name,
|
||||||
# "--collect",
|
# "--collect",
|
||||||
# "--user",
|
# "--user",
|
||||||
# "-p",
|
# "-p",
|
||||||
# f"LoadCredential={service.secret_name}:{sock}",
|
# f"LoadCredential={service.secret_name}:{sock}",
|
||||||
# "--wait",
|
# "--wait",
|
||||||
# "--pipe",
|
# "--pipe",
|
||||||
# "cat",
|
# "cat",
|
||||||
# "${CREDENTIALS_DIRECTORY}/" + service.secret_name,
|
# "${CREDENTIALS_DIRECTORY}/" + service.secret_name,
|
||||||
# ],
|
# ],
|
||||||
# stdout=subprocess.PIPE,
|
# stdout=subprocess.PIPE,
|
||||||
#)
|
# )
|
||||||
#time.sleep(0.1)
|
# time.sleep(0.1)
|
||||||
#assert proc.poll() is None, "service should block for secret"
|
# assert proc.poll() is None, "service should block for secret"
|
||||||
#service.secret_path.write_text("foo")
|
# service.secret_path.write_text("foo")
|
||||||
#assert proc.stdout is not None and proc.stdout.read() == "foo"
|
# assert proc.stdout is not None and proc.stdout.read() == "foo"
|
||||||
#assert proc.wait() == 0
|
# assert proc.wait() == 0
|
||||||
|
Loading…
Reference in New Issue