From a225d28b6e644dadf45970b597900faad6ea993b Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Wed, 26 Feb 2025 16:53:10 +0200 Subject: [PATCH] Unit tests --- tests/unit/test_data_interfaces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_data_interfaces.py b/tests/unit/test_data_interfaces.py index 8e6d33f2..817d5fad 100644 --- a/tests/unit/test_data_interfaces.py +++ b/tests/unit/test_data_interfaces.py @@ -347,7 +347,7 @@ def _on_index_requested(self, _) -> None: class DataProvidesBaseTests(ABC): - SECRET_FIELDS = ["username", "password", "tls", "tls-ca", "uris"] + SECRET_FIELDS = ["username", "password", "tls", "tls-ca", "uris", "read-only-uris"] DATABASE_FIELD = "database" @pytest.fixture @@ -946,6 +946,7 @@ def test_set_additional_fields(self): self.harness.charm.provider.set_tls(self.rel_id, "True") self.harness.charm.provider.set_tls_ca(self.rel_id, "Canonical") self.harness.charm.provider.set_uris(self.rel_id, "host1:port,host2:port") + self.harness.charm.provider.set_read_only_uris(self.rel_id, "host2:port") self.harness.charm.provider.set_version(self.rel_id, "1.0") # Check that the additional fields are present in the relation. @@ -957,6 +958,7 @@ def test_set_additional_fields(self): "tls": "True", "tls-ca": "Canonical", "uris": "host1:port,host2:port", + "read-only-uris": "host2:port", "version": "1.0", }