diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2023-01-18 10:56:51 -0800 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2023-01-18 11:11:43 -0800 |
commit | 9a85e4787b9f7256ccd09ea293b89509666b88c7 (patch) | |
tree | 942693671e97b85f687f0607a0b32c11f69aa0b8 /ironic/tests/unit/drivers/modules/network/test_common.py | |
parent | 571d0223baf7b45ac9297954d8e352ab9d1bedd6 (diff) | |
download | ironic-9a85e4787b9f7256ccd09ea293b89509666b88c7.tar.gz |
CI: Fix race prone unit test in networking
In the networking code stack, one of the methods
looks to identify if a change has occured, except
some of the other tests utilize the same value that
was previously asserted for the same base object.
Becaues of this, just use a unique value so we
don't risk the possibility of the test failing
erroneously.
Change-Id: Ide2b205ade67a4090a0b9bfe1282d01f7605ceb9
Diffstat (limited to 'ironic/tests/unit/drivers/modules/network/test_common.py')
-rw-r--r-- | ironic/tests/unit/drivers/modules/network/test_common.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ironic/tests/unit/drivers/modules/network/test_common.py b/ironic/tests/unit/drivers/modules/network/test_common.py index 555024216..7b907ad22 100644 --- a/ironic/tests/unit/drivers/modules/network/test_common.py +++ b/ironic/tests/unit/drivers/modules/network/test_common.py @@ -1086,7 +1086,9 @@ class TestNeutronVifPortIDMixin(db_base.DbTestCase): autospec=True) def test_port_changed_client_id_fail(self, dhcp_update_mock): self.port.internal_info = {'tenant_vif_port_id': 'fake-id'} - self.port.extra = {'client-id': 'fake2'} + self.port.extra = {'client-id': 'fake3'} + # NOTE(TheJulia): Does not save, because it attempts to figure + # out what has changed as part of the test. dhcp_update_mock.side_effect = ( exception.FailedToUpdateDHCPOptOnPort(port_id=self.port.uuid)) with task_manager.acquire(self.context, self.node.id) as task: |