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: I1a622ab9c766d46b7eb4442848e91f25b26f6c61
This commit is contained in:
parent
ab6fd39925
commit
fa8df69194
@ -980,6 +980,7 @@ class TestObjectSerializer(test_base.TestCase):
|
||||
class TestRegistry(test_base.TestCase):
|
||||
@mock.patch('ironic.objects.base.objects', autospec=True)
|
||||
def test_hook_chooses_newer_properly(self, mock_objects):
|
||||
del mock_objects.MyObj
|
||||
reg = base.IronicObjectRegistry()
|
||||
reg.registration_hook(MyObj, 0)
|
||||
|
||||
@ -996,6 +997,7 @@ class TestRegistry(test_base.TestCase):
|
||||
|
||||
@mock.patch('ironic.objects.base.objects', autospec=True)
|
||||
def test_hook_keeps_newer_properly(self, mock_objects):
|
||||
del mock_objects.MyObj
|
||||
reg = base.IronicObjectRegistry()
|
||||
reg.registration_hook(MyObj, 0)
|
||||
|
||||
|
@ -697,6 +697,8 @@
|
||||
tox_envlist: py3
|
||||
# The job only tests the latest and shouldn't be run on the stable branches
|
||||
branches: ^master$
|
||||
# TODO(tkajinam): Make this voting once oslo.utils is bumped to 6.3.0
|
||||
voting: false
|
||||
required-projects:
|
||||
- name: github.com/sqlalchemy/sqlalchemy
|
||||
override-checkout: main
|
||||
|
Loading…
Reference in New Issue
Block a user