clanInternals.machines: expose information as json

This commit is contained in:
Jörg Thalheim
2023-09-27 17:25:17 +02:00
parent 628fcd5e04
commit 85f7e2f2cd
4 changed files with 22 additions and 13 deletions

View File

@@ -31,10 +31,11 @@ def test_secrets_upload(
host = host_group.hosts[0]
addr = f"{host.user}@{host.host}:{host.port}?StrictHostKeyChecking=no&UserKnownHostsFile=/dev/null&IdentityFile={host.key}"
new_text = flake.read_text().replace("__CLAN_DEPLOYMENT_ADDRESS__", addr)
sops_key = test_flake_with_core.joinpath("sops.key")
new_text = new_text.replace("__CLAN_SOPS_KEY_PATH__", str(sops_key))
flake.write_text(new_text)
cli.run(["secrets", "upload", "vm1"])
# the flake defines this path as the location where the sops key should be installed
sops_key = test_flake_with_core.joinpath("sops.key")
assert sops_key.exists()
assert sops_key.read_text() == age_keys[0].privkey