Fix: secret facts store test

This commit is contained in:
Johannes Kirschbauer
2025-01-14 12:52:24 +01:00
parent 10d7078c1e
commit 14261b8a8c

View File

@@ -85,19 +85,21 @@ def test_upload_secret(
assert zerotier_identity_secret.exists()
assert store.exists("", "zerotier-identity-secret")
assert store.exists("", "password")
assert store.exists("", "password-hash")
assert store.exists("", "user-password")
assert store.exists("", "user-password-hash")
assert store.exists("", "zerotier-identity-secret")
# Since root-password uses Vars they should not be uploaded / generated by the facts
assert not store.exists("", "password")
assert not store.exists("", "password-hash")
# Assert that root-password is valid
pwd_secret = store.get("", "password").decode()
assert pwd_secret.isprintable()
assert pwd_secret.isascii()
pwd_hash = store.get("", "password-hash").decode()
assert pwd_hash.isprintable()
assert pwd_hash.isascii()
# pwd_secret = store.get("", "password").decode()
# assert pwd_secret.isprintable()
# assert pwd_secret.isascii()
# pwd_hash = store.get("", "password-hash").decode()
# assert pwd_hash.isprintable()
# assert pwd_hash.isascii()
# Assert that user-password is valid
pwd_secret = store.get("", "user-password").decode()