UT: Add safety test since we will switch to pydantic.SecretType

This commit is contained in:
Mike Salvatore 2022-09-06 09:46:52 -04:00 committed by vakaris_zilius
parent b08097b131
commit 8fd226cd23
1 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,10 @@ def check_if_stored_credentials_encrypted(mongo_client: MongoClient, original_cr
for key, value in credentials_component.items():
assert original_credentials_mapping[identity_or_secret][key] != value.decode()
# Since secrets use the pydantic.SecretType, make sure we're not just storing
# all '*' characters.
assert "***" not in value.decode()
def get_all_credentials_in_mongo(
mongo_client: MongoClient,