From 6fec7c31a4766679cc62d2a9b5478bb11355a6dd Mon Sep 17 00:00:00 2001 From: Felipe Reyes Date: Wed, 22 Mar 2023 14:40:50 -0300 Subject: [PATCH] Use zaza.model.get_unit_public_address() Replace the use of "unit.public_address" with zaza.model.get_unit_public_address(). AssertionError: {'host': '172.16.0.25', 'port': 3306, 'user': 'prom_exporter'} != {'host': None, 'port': 3306, 'user': 'prom_exporter'} - {'host': '172.16.0.25', 'port': 3306, 'user': 'prom_exporter'} ? ^^^^^^^^^^^^^ + {'host': None, 'port': 3306, 'user': 'prom_exporter'} Related-Bug: openstack-charmers/zaza#472 --- .../charm_tests/mysql/test_prometheus_mysql_exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py b/zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py index 723bea9..1ff5e37 100644 --- a/zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py +++ b/zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py @@ -118,7 +118,7 @@ class PrometheusMySQLExporterTest(MySQLBaseTest): self.assertEqual( json_mysql_config, { - "host": unit.public_address, + "host": zaza_model.get_unit_public_address(unit), "port": 3306, "user": "prom_exporter" }