Browse Source

fix unit tests

changes/73/738573/1
Aymen Frikha 3 years ago
parent
commit
30ad5cf558
  1. 2
      src/reactive/neutron_arista_handlers.py
  2. 2
      unit_tests/test_neutron_arista_handlers.py

2
src/reactive/neutron_arista_handlers.py

@ -26,6 +26,7 @@ import charm.openstack.neutron_arista as arista # noqa
use_defaults('update-status')
@reactive.when_not('arista-package.installed')
@reactive.when('neutron-plugin-api-subordinate.available')
def install_arista():
@ -33,6 +34,7 @@ def install_arista():
charm_class.install()
reactive.set_state('arista-package.installed')
@reactive.when('neutron-plugin-api-subordinate.connected')
def configure_principle(api_principle):
inject_config = {

2
unit_tests/test_neutron_arista_handlers.py

@ -15,6 +15,8 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
'when': {
'configure_principle': (
'neutron-plugin-api-subordinate.connected', ),
'install_arista': (
'neutron-plugin-api-subordinate.available', )
}
}
# test that the hooks were registered via the

Loading…
Cancel
Save