diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-02 22:36:37 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 21:36:37 -0700 |
commit | ffa6fc88249aa080aa31811a45569a45e567418a (patch) | |
tree | 173c86024247ec73e112f1ecbf9ae37ccfa5c3f4 /tests/unittests | |
parent | 0fe96a44cde48cc688afe75beb8fd126c8892b8c (diff) | |
download | cloud-init-git-ffa6fc88249aa080aa31811a45569a45e567418a.tar.gz |
Fix exception when no activator found (#1129)
Given that there are additional network management tools that we haven't
yet supported with activators, we should log a warning and continue
without network activation here, especially since this was a no-op for
years.
LP: #1948681
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/test_net_activators.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unittests/test_net_activators.py b/tests/unittests/test_net_activators.py index f63a8b74..9da21195 100644 --- a/tests/unittests/test_net_activators.py +++ b/tests/unittests/test_net_activators.py @@ -12,7 +12,8 @@ from cloudinit.net.activators import ( IfUpDownActivator, NetplanActivator, NetworkManagerActivator, - NetworkdActivator + NetworkdActivator, + NoActivatorException, ) from cloudinit.net.network_state import parse_net_config_data from cloudinit.safeyaml import load @@ -99,7 +100,7 @@ class TestSearchAndSelect: resp = search_activator() assert resp == [] - with pytest.raises(RuntimeError): + with pytest.raises(NoActivatorException): select_activator() |