From 16e0fbbfa75e83f63031416b076e84175be0b2fe Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Fri, 22 Apr 2022 07:22:22 +0200 Subject: [PATCH] ovn: Fix ``wrong_bridge_config`` test The test blindly reverts the ``bridge-interface-mappings`` configuration to an empty string, which would be the wrong thing to do if it was previously set up by a test configure step. The test also does not properly populate target_deploy_status and the test will always wait for the next update status to run, which may take several minutes, before completing. --- zaza/openstack/charm_tests/ovn/tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zaza/openstack/charm_tests/ovn/tests.py b/zaza/openstack/charm_tests/ovn/tests.py index 3b43d65..c99b2b9 100644 --- a/zaza/openstack/charm_tests/ovn/tests.py +++ b/zaza/openstack/charm_tests/ovn/tests.py @@ -177,7 +177,8 @@ class ChassisCharmOperationTest(BaseCharmOperationTest): 'target_deploy_status', {}) new_target_deploy_status = stored_target_deploy_status.copy() new_target_deploy_status[self.application_name] = { - 'ovn-chassis': 'blocked', + 'workload-status': 'blocked', + 'workload-status-message': 'Wrong format', } if 'target_deploy_status' in self.test_config: self.test_config['target_deploy_status'].update( @@ -186,7 +187,9 @@ class ChassisCharmOperationTest(BaseCharmOperationTest): self.test_config['target_deploy_status'] = new_target_deploy_status with self.config_change( - {'bridge-interface-mappings': ''}, + self.config_current( + application_name=self.application_name, + keys=['bridge-interface-mappings']), {'bridge-interface-mappings': 'incorrect'}): logging.info('Charm went into blocked state as expected, restore ' 'configuration')