Tempest test tempest.api.network.test_routers.RoutersIpV6Test.test_update_router_set_gateway fails

Bug #1604929 reported by Vedamurthy Joshi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
New
Undecided
Sachin Bansal
R3.1
New
High
Sachin Bansal

Bug Description

R3.0.2.0 Build 52 Liberty

Tempest test tempest.api.network.test_routers.RoutersIpV6Test.test_update_router_set_gateway fails with below error.
The test expects that once the router is updated with external gateway VN, a port gets created from that VN with device-id of the router

But in contrail, it does not happen then.
It happens only when an interface is added to the router using router-interface-add. This test does not do router-interface-add

Traceback (most recent call last):
  File "tempest/api/network/test_routers.py", line 210, in test_update_router_set_gateway
    self._verify_gateway_port(router['id'])
  File "tempest/api/network/test_routers.py", line 189, in _verify_gateway_port
    self.assertEqual(len(list_body['ports']), 1)
  File "/root/.rally/tempest/for-deployment-7119472f-586e-473d-b3d2-51cdaa441f9c/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/root/.rally/tempest/for-deployment-7119472f-586e-473d-b3d2-51cdaa441f9c/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 0 != 1

-------------

Related test code :

    def _verify_gateway_port(self, router_id):
        list_body = self.admin_ports_client.list_ports(
            network_id=CONF.network.public_network_id,
            device_id=router_id)
        self.assertEqual(len(list_body['ports']), 1)
        gw_port = list_body['ports'][0]
        fixed_ips = gw_port['fixed_ips']
        self.assertGreaterEqual(len(fixed_ips), 1)
        public_net_body = self.admin_networks_client.show_network(
            CONF.network.public_network_id)
        public_subnet_id = public_net_body['network']['subnets'][0]
        self.assertIn(public_subnet_id,
                      map(lambda x: x['subnet_id'], fixed_ips))

    @test.idempotent_id('6cc285d8-46bf-4f36-9b1a-783e3008ba79')
    def test_update_router_set_gateway(self):
        router = self._create_router(data_utils.rand_name('router-'))
        self.routers_client.update_router(
            router['id'],
            external_gateway_info={
                'network_id': CONF.network.public_network_id})
        # Verify operation - router
        import pdb; pdb.set_trace()
        self._verify_router_gateway(
            router['id'],
            {'network_id': CONF.network.public_network_id})
        self._verify_gateway_port(router['id'])

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.