Skip to content

Commit e04d20a

Browse files
committed
Fix unit tests broken by olso.utils
Some of the object unit tests grub Mock object unintentionally, and that results in failure during initializing an versioned object, because the Mock object does not present its version correctly. This fixes that problem The sqlalchemy-2x job is made non-voting because this job requires oslo.utils 6.3.0 which is blocked by this problem. Closes-Bug: #2043116 Related-Bug: #2042886 Change-Id: Id1c1b77c020e2d8f0ac61c2aee86c9f37d388d53
1 parent 1e75373 commit e04d20a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.zuul.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
Takes advantage of the base tox job's install-siblings feature.
3737
# The job only tests the latest and shouldn't be run on the stable branches
3838
branches: ^master$
39+
# TODO(tkajinam): Make this voting once oslo.utils is bumped to 6.3.0
40+
voting: false
3941
required-projects:
4042
- name: github.com/sqlalchemy/sqlalchemy
4143
override-checkout: main

nova/tests/unit/objects/test_objects.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,7 @@ def test_serialize_args_non_nova_exception(self):
10401040
class TestRegistry(test.NoDBTestCase):
10411041
@mock.patch('nova.objects.base.objects')
10421042
def test_hook_chooses_newer_properly(self, mock_objects):
1043+
del mock_objects.MyObj
10431044
reg = base.NovaObjectRegistry()
10441045
reg.registration_hook(MyObj, 0)
10451046

@@ -1056,6 +1057,7 @@ def obj_name(cls):
10561057

10571058
@mock.patch('nova.objects.base.objects')
10581059
def test_hook_keeps_newer_properly(self, mock_objects):
1060+
del mock_objects.MyObj
10591061
reg = base.NovaObjectRegistry()
10601062
reg.registration_hook(MyObj, 0)
10611063

0 commit comments

Comments
 (0)