Merge "Add logging of the test steps in NetworkWritableMtuTest"
diff --git a/neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py b/neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py
index 3981dfb..105112d 100644
--- a/neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py
+++ b/neutron_tempest_plugin/api/admin/test_l3_agent_scheduler.py
@@ -68,18 +68,30 @@
     @decorators.idempotent_id('9464e5e7-8625-49c3-8fd1-89c52be59d66')
     def test_add_list_remove_router_on_l3_agent(self):
         l3_agent_ids = list()
+
+        # First list agents which host router
+        body = self.admin_client.list_l3_agents_hosting_router(
+            self.router['id'])
+        # Now remove router from all agents
+        for agent in body['agents']:
+            self.admin_client.remove_router_from_l3_agent(
+                agent['id'], self.router['id'])
+
+        # Now list agents which host router again - list should be empty
+        body = self.admin_client.list_l3_agents_hosting_router(
+            self.router['id'])
+        self.assertEqual([], body['agents'])
+
+        # Now add router to one of agents
         self.admin_client.add_router_to_l3_agent(
             self.agent['id'],
+            router_id=self.router['id'])
+
+        # And check that router is hosted by this agent
+        body = self.admin_client.list_l3_agents_hosting_router(
             self.router['id'])
-        body = (
-            self.admin_client.list_l3_agents_hosting_router(self.router['id']))
         for agent in body['agents']:
             l3_agent_ids.append(agent['id'])
             self.assertIn('agent_type', agent)
             self.assertEqual('L3 agent', agent['agent_type'])
         self.assertIn(self.agent['id'], l3_agent_ids)
-        body = self.admin_client.remove_router_from_l3_agent(
-            self.agent['id'],
-            self.router['id'])
-        # NOTE(afazekas): The deletion not asserted, because neutron
-        # is not forbidden to reschedule the router to the same agent
diff --git a/neutron_tempest_plugin/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py
index 38833cd..be57475 100644
--- a/neutron_tempest_plugin/scenario/test_floatingip.py
+++ b/neutron_tempest_plugin/scenario/test_floatingip.py
@@ -310,10 +310,12 @@
             timed_out = int(time.time()) - start >= timeout
 
             if status != lib_constants.PORT_STATUS_DOWN and timed_out:
+                port_id = fip.get("port_id")
+                port = self.os_admin.network_client.show_port(port_id)['port']
                 message = ('Floating IP %s attached port status failed to '
                            'transition to DOWN (current status %s) within '
-                           'the required time (%s s).' %
-                           (fip_id, status, timeout))
+                           'the required time (%s s). Port details: %s' %
+                           (fip_id, status, timeout, port))
                 raise exceptions.TimeoutException(message)
 
         return fip
diff --git a/tox.ini b/tox.ini
index 82a473c..9941e12 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,14 +5,17 @@
 
 [testenv]
 usedevelop = True
-install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
 setenv =
    VIRTUAL_ENV={envdir}
    PYTHONWARNINGS=default::DeprecationWarning
    OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
    OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
    OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
-deps = -r{toxinidir}/test-requirements.txt
+install_command =
+  pip install {opts} {packages}
+deps =
+  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+  -r{toxinidir}/test-requirements.txt
 commands = stestr run --slowest {posargs}
 
 [testenv:pep8]