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.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user