Public bug reported:
Hi,
Following test fails. I debugged this test and I think following
"self.assertNotIn('ha', router)" method should be change, because router
has 'ha' words. Should be check "ha:False" words instead of "ha".
Test:
neutron_tempest_plugin.api.test_routers.HaRoutersTest.test_convert_legacy_router
Test Output:
...
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File
"/etc/tempest/neutron-tempest-plugin/neutron_tempest_plugin/api/test_routers.py",
line 403, in test_convert_legacy_router
self.assertNotIn('ha', router)
File
"/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line
438, in assertNotIn
self.assertThat(haystack, matcher, message)
File
"/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line
481, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: {'id':
'f41597b3-393d-4c7c-ba63-7f04be54eb72', 'name': 'tempest-router-575255089',
'tenant_id': '4a67f9be2c8c4a1b8718b556a2cd66b0', 'admin_state_up': False,
'status': 'ACTIVE', 'external_gateway_info': None, 'description': '',
'availability_zones': [], 'distributed': True, 'ha': False,
'availability_zone_hints': [], 'routes': [], 'flavor_id': None, 'tags': [],
'created_at': '2024-02-02T12:13:08Z', 'updated_at': '2024-02-02T12:13:08Z',
'revision_number': 1, 'project_id': '4a67f9be2c8c4a1b8718b556a2cd66b0'} matches
Contains('ha')
...
Function:
/etc/tempest/neutron-tempest-
plugin/neutron_tempest_plugin/api/test_routers.py Line405
test_convert_legacy_router()
class HaRoutersTest(base_routers.BaseRouterTest):
required_extensions = ['l3-ha']
@decorators.idempotent_id('77db8eae-3aa3-4e61-bf2a-e739ce042e53')
def test_convert_legacy_router(self):
router = self._create_router(data_utils.rand_name('router'))
import pdb; pdb.set_trace()
self.assertNotIn('ha', router)
update_body = self.admin_client.update_router(router['id'],
ha=True)
self.assertTrue(update_body['router']['ha'])
show_body = self.admin_client.show_router(router['id'])
self.assertTrue(show_body['router']['ha'])
show_body = self.client.show_router(router['id'])
self.assertNotIn('ha', show_body['router'])
...
Regards,
** Affects: neutron
Importance: Undecided
Status: New
** Tags: check functional-tests ha neutron router tempest test
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2052299
Title:
neutron-tempest-plugin - HaRoutersTest.test_convert_legacy_router Test
"ha" Check Error
Status in neutron:
New
Bug description:
Hi,
Following test fails. I debugged this test and I think following
"self.assertNotIn('ha', router)" method should be change, because
router has 'ha' words. Should be check "ha:False" words instead of
"ha".
Test:
neutron_tempest_plugin.api.test_routers.HaRoutersTest.test_convert_legacy_router
Test Output:
...
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File
"/etc/tempest/neutron-tempest-plugin/neutron_tempest_plugin/api/test_routers.py",
line 403, in test_convert_legacy_router
self.assertNotIn('ha', router)
File
"/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line
438, in assertNotIn
self.assertThat(haystack, matcher, message)
File
"/opt/venv/tempest/lib/python3.8/site-packages/testtools/testcase.py", line
481, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: {'id':
'f41597b3-393d-4c7c-ba63-7f04be54eb72', 'name': 'tempest-router-575255089',
'tenant_id': '4a67f9be2c8c4a1b8718b556a2cd66b0', 'admin_state_up': False,
'status': 'ACTIVE', 'external_gateway_info': None, 'description': '',
'availability_zones': [], 'distributed': True, 'ha': False,
'availability_zone_hints': [], 'routes': [], 'flavor_id': None, 'tags': [],
'created_at': '2024-02-02T12:13:08Z', 'updated_at': '2024-02-02T12:13:08Z',
'revision_number': 1, 'project_id': '4a67f9be2c8c4a1b8718b556a2cd66b0'} matches
Contains('ha')
...
Function:
/etc/tempest/neutron-tempest-
plugin/neutron_tempest_plugin/api/test_routers.py Line405
test_convert_legacy_router()
class HaRoutersTest(base_routers.BaseRouterTest):
required_extensions = ['l3-ha']
@decorators.idempotent_id('77db8eae-3aa3-4e61-bf2a-e739ce042e53')
def test_convert_legacy_router(self):
router = self._create_router(data_utils.rand_name('router'))
import pdb; pdb.set_trace()
self.assertNotIn('ha', router)
update_body = self.admin_client.update_router(router['id'],
ha=True)
self.assertTrue(update_body['router']['ha'])
show_body = self.admin_client.show_router(router['id'])
self.assertTrue(show_body['router']['ha'])
show_body = self.client.show_router(router['id'])
self.assertNotIn('ha', show_body['router'])
...
Regards,
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2052299/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp