From b6db21f6c9408b086282f68d86db0eb3f4d88550 Mon Sep 17 00:00:00 2001 From: Seyeong Kim Date: Tue, 1 Oct 2024 23:27:47 +0000 Subject: [PATCH 1/2] Removing remaining changes even after reverting an old commit. https://github.com/openstack-charmers/zaza-openstack-tests/commit/61ac4bc8ded11b4a4cf2c233f170780238b97450 Signed-off-by: Seyeong Kim --- zaza/openstack/charm_tests/mysql/tests.py | 63 ----------------------- 1 file changed, 63 deletions(-) diff --git a/zaza/openstack/charm_tests/mysql/tests.py b/zaza/openstack/charm_tests/mysql/tests.py index 7c574a919..710195541 100644 --- a/zaza/openstack/charm_tests/mysql/tests.py +++ b/zaza/openstack/charm_tests/mysql/tests.py @@ -1145,66 +1145,3 @@ def test_910_restart_on_config_change(self): {}, {}, self.services) logging.info("Passed restart on changed test.") - - def test_920_mysqlrouter_conf_broken(self): - """Checking conf broken case. - - Run the bootstrap when conf is broken - """ - # application_name on test is keystone-mysql-router - # using self.conf_file introduces error. - # instead of changing current self.conf_file, - # define one (it could introduce another issue) - config_file = ( - "/var/lib/mysql/{}/mysqlrouter.conf" - .format(self.application_name)) - - logging.info("Starting broken conf test") - - # put empty string to conf_file and make it wrong - logging.info("Breaking configuration file") - zaza.model.run_on_leader(self.application, - "echo '[DEFAULT]\n \ - [metadata_cache:[\\w$]+$] \ - ' > {}".format( - config_file)) - - logging.info("Getting configuration file") - recovered = zaza.model.run_on_leader(self.application, - "cat {}".format( - config_file))['Stdout'] - - # Checking conf file length, - # if file is broken it is around 250 - assert len(recovered) < 1000, ( - "Breaking mysqlrouter conf failed.") - - # verify it is in error state - for attempt in tenacity.Retrying( - reraise=True, - wait=tenacity.wait_fixed(10), - stop=tenacity.stop_after_attempt(30), - ): - with attempt: - # update status to make the status error - logging.info("Run update-status") - self.run_update_status_hooks(['keystone-mysql-router/0']) - - # get current status - unit_status = (zaza.model.get_status() - .applications - ['keystone-mysql-router']['status']) - logging.info("Status:{}".format(unit_status['status'])) - self.assertEqual(unit_status['status'], "active") - - logging.info("Getting configuration file") - recovered = zaza.model.run_on_leader(self.application, - "cat {}".format( - config_file))['Stdout'] - - # Checking conf file length, - # if file is broken it is around 250 - assert len(recovered) > 1000, ( - "Fixing mysqlrouter conf failed.") - - logging.info("Passed broken conf test.") From 3bc5563c44ea474870231d82979695ea7bbc338d Mon Sep 17 00:00:00 2001 From: Seyeong Kim Date: Wed, 1 Oct 2025 11:43:44 +0900 Subject: [PATCH 2/2] Adding config proxyv2 test Signed-off-by: Seyeong Kim --- zaza/openstack/charm_tests/keystone/tests.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zaza/openstack/charm_tests/keystone/tests.py b/zaza/openstack/charm_tests/keystone/tests.py index a2ee3c281..de235f5fa 100644 --- a/zaza/openstack/charm_tests/keystone/tests.py +++ b/zaza/openstack/charm_tests/keystone/tests.py @@ -789,6 +789,19 @@ def test_200_config_flags_precedence(self): "user_tree_dn value is expected to be present " "and set to dc=test,dc=com in the config file") +class KeystoneProxyV2Test(BaseKeystoneTest): + + """Test keystone proxy v2.""" + def test_proxy_v2(self): + """Test keystone proxy v2.""" + + with self.config_change({ + 'haproxy-enable-proxyv2': True + }): + logging.info("Waiting for keystone to settle") + zaza.model.wait_for_application_states() + zaza.model.block_until_all_units_idle() + logging.info("Keystone units settled") class KeystoneTempestTestK8S(tempest_tests.TempestTestScaleK8SBase): """Test keystone k8s scale out and scale back."""