Skip to content

Commit a59dddd

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix the common/ovn functional tests" into stable/2023.1
2 parents e56f412 + cc64243 commit a59dddd

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

neutron/tests/functional/common/ovn/__init__.py

Whitespace-only changes.

neutron/tests/functional/common/ovn/test_utils.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414

15-
from unittest import mock
16-
17-
from oslo_utils import uuidutils
18-
1915
from neutron.common.ovn import constants as ovn_const
2016
from neutron.common.ovn import utils
2117
from neutron.tests.functional import base
@@ -67,18 +63,16 @@ def test_non_existing(self):
6763
class TestSyncHaChassisGroup(base.TestOVNFunctionalBase):
6864

6965
def test_sync_ha_chassis_group(self):
70-
plugin = mock.Mock()
71-
plugin.get_network.return_value = {}
72-
network_id = uuidutils.generate_uuid()
73-
hcg_name = utils.ovn_name(network_id)
66+
net = self._make_network(self.fmt, 'n1', True)['network']
67+
hcg_name = utils.ovn_name(net['id'])
7468
chassis1 = self.add_fake_chassis('host1', azs=[],
7569
enable_chassis_as_gw=True)
7670
chassis2 = self.add_fake_chassis('host2', azs=[],
7771
enable_chassis_as_gw=True)
7872
self.add_fake_chassis('host3')
7973

8074
with self.nb_api.transaction(check_error=True) as txn:
81-
utils.sync_ha_chassis_group(self.context, network_id, self.nb_api,
75+
utils.sync_ha_chassis_group(self.context, net['id'], self.nb_api,
8276
self.sb_api, txn)
8377

8478
ha_chassis = self.nb_api.db_find('HA_Chassis').execute(
@@ -100,7 +94,7 @@ def test_sync_ha_chassis_group(self):
10094
# HA Chassis Group register but will update the "ha_chassis" list.
10195
self.del_fake_chassis(chassis2)
10296
with self.nb_api.transaction(check_error=True) as txn:
103-
utils.sync_ha_chassis_group(self.context, network_id, self.nb_api,
97+
utils.sync_ha_chassis_group(self.context, net['id'], self.nb_api,
10498
self.sb_api, txn)
10599

106100
ha_chassis = self.nb_api.db_find('HA_Chassis').execute(

0 commit comments

Comments
 (0)