Browse Source

Use created subnet in port generator in "test_port_ip_update_revises"

We are hitting sometimes a problem in "test_port_ip_update_revises" [1].
This happens because the port created doesn't belong to the previously
created subnet. We need to enforce that the port is created in the
subnet specifically created in this test.

[1]http://logs.openstack.org/69/650269/12/check/openstack-tox-lower-constraints/7adf36e/testr_results.html.gz

Conflicts:
    neutron/tests/unit/services/revisions/test_revision_plugin.py

Change-Id: I399f100fe30b6a03248cef5e6026204d4d1ffb2e
Closes-Bug: #1828865
(cherry picked from commit 872dd7f484)
changes/63/680663/1
Rodolfo Alonso Hernandez 4 months ago
parent
commit
3d249a8016
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      neutron/tests/unit/services/revisions/test_revision_plugin.py

+ 1
- 1
neutron/tests/unit/services/revisions/test_revision_plugin.py View File

@@ -144,7 +144,7 @@ class TestRevisionPlugin(test_plugin.Ml2PluginV2TestCase):
144 144
                          expected_code=exc.HTTPPreconditionFailed.code)
145 145
 
146 146
     def test_port_ip_update_revises(self):
147
-        with self.port() as port:
147
+        with self.subnet() as subnet, self.port(subnet=subnet) as port:
148 148
             rev = port['port']['revision_number']
149 149
             new = {'port': {'fixed_ips': port['port']['fixed_ips']}}
150 150
             # ensure adding an IP allocation updates the port

Loading…
Cancel
Save