Open jaronoff97 opened 1 month ago
hmmm it looks like my vault isn't being started maybe?
settings = settings_fixture()
IO.puts("------")
IO.inspect(MyApp.Orgs.Vault.decrypt(settings.token))
IO.puts("------")
assert Orgs.list_settings() == [settings]
results in this error:
{:error,
%Cloak.MissingCipher{
message: "No cipher found for vault: nil, ciphertext: \"some token\"",
vault: nil,
label: nil,
ciphertext: "some token"
}}
I have a schema that was created with a migration for ecto_ch:
with a model like so:
where SecretKey is:
I have a simple test that makes a settings object and then lists the object. but I'm getting this error:
Which implies that when I go to decrypt from my database, it's unable to use the vault to decrypt my encrypted key. I updated my test_helper.exs to ensure the vault was started, but no dice.
MyApp.Orgs.Vault.start_link()