Skip to content

Commit

Permalink
fix: Refreshes secret content before getting its content (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
gruyaume authored Jan 2, 2024
1 parent e3604fb commit a3fab08
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,19 @@ def test_given_initial_config_when_config_changed_then_stored_ca_common_name_use

self.harness.update_config(key_values={"ca-common-name": new_common_name})

ca_certificates_secret = self.harness._backend.secret_get(label="ca-certificates")
ca_certificates_secret = self.harness.model.get_secret(label="ca-certificates")

secret_content = ca_certificates_secret.get_content(refresh=True)
self.assertEqual(
ca_certificates_secret["ca-certificate"],
secret_content["ca-certificate"],
ca_certificate_2_string,
)
self.assertEqual(
ca_certificates_secret["private-key-password"],
secret_content["private-key-password"],
private_key_password_2,
)
self.assertEqual(
ca_certificates_secret["private-key"],
secret_content["private-key"],
private_key_string_2,
)

Expand Down

0 comments on commit a3fab08

Please sign in to comment.