Update .gitreview for unmaintained/yoga, fix CI
- Moved jobs to tinyipa - fixed test_mdns failures by detecting python version Change-Id: Iae0076e4e87b74a0409fcd2071bebac3fd734845
This commit is contained in:
parent
29fb9e75f6
commit
4d63e9e1b5
@ -2,4 +2,4 @@
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/ironic-lib.git
|
||||
defaultbranch=stable/yoga
|
||||
defaultbranch=unmaintained/yoga
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import socket
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
@ -37,7 +38,7 @@ class RegisterServiceTestCase(base.IronicLibTestCase):
|
||||
self.assertEqual('_openstack._tcp.local.', info.type)
|
||||
self.assertEqual('baremetal._openstack._tcp.local.', info.name)
|
||||
self.assertEqual('127.0.0.1', socket.inet_ntoa(info.addresses[0]))
|
||||
self.assertEqual({'path': '/baremetal'}, info.properties)
|
||||
self.assertByteDictEqual({'path': '/baremetal'}, info.properties)
|
||||
|
||||
def test_with_params(self, mock_zc):
|
||||
CONF.set_override('params', {'answer': 'none', 'foo': 'bar'},
|
||||
@ -50,10 +51,10 @@ class RegisterServiceTestCase(base.IronicLibTestCase):
|
||||
self.assertEqual('_openstack._tcp.local.', info.type)
|
||||
self.assertEqual('baremetal._openstack._tcp.local.', info.name)
|
||||
self.assertEqual('127.0.0.1', socket.inet_ntoa(info.addresses[0]))
|
||||
self.assertEqual({'path': '/baremetal',
|
||||
'answer': 42,
|
||||
'foo': 'bar'},
|
||||
info.properties)
|
||||
self.assertByteDictEqual({'path': '/baremetal',
|
||||
'answer': 42,
|
||||
'foo': 'bar'},
|
||||
info.properties)
|
||||
|
||||
@mock.patch.object(mdns.time, 'sleep', autospec=True)
|
||||
def test_with_race(self, mock_sleep, mock_zc):
|
||||
@ -81,7 +82,17 @@ class RegisterServiceTestCase(base.IronicLibTestCase):
|
||||
self.assertEqual('_openstack._tcp.local.', info.type)
|
||||
self.assertEqual('baremetal._openstack._tcp.local.', info.name)
|
||||
self.assertEqual('127.0.0.1', socket.inet_ntoa(info.addresses[0]))
|
||||
self.assertEqual({'path': '/baremetal'}, info.properties)
|
||||
self.assertByteDictEqual({'path': '/baremetal'}, info.properties)
|
||||
|
||||
def assertByteDictEqual(self, expected, actual):
|
||||
# Python 3.9+ returns bytes for keys and values
|
||||
if sys.version_info.major == 3 and sys.version_info.minor <= 8:
|
||||
self.assertEqual(expected, actual)
|
||||
return
|
||||
self.assertEqual(
|
||||
{k.encode(): str(v).encode() for k, v in expected.items()},
|
||||
actual
|
||||
)
|
||||
|
||||
@mock.patch.object(mdns.time, 'sleep', autospec=True)
|
||||
def test_failure(self, mock_sleep, mock_zc):
|
||||
|
2
tox.ini
2
tox.ini
@ -13,7 +13,7 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
LANGUAGE=en_US
|
||||
TESTS_DIR=./ironic_lib/tests/
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/unmaintained/yoga/upper-constraints.txt}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-r{toxinidir}/extra-requirements.txt
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
@ -16,6 +16,7 @@
|
||||
vars:
|
||||
tempest_test_timeout: 1800
|
||||
devstack_localrc:
|
||||
IRONIC_RAMDISK_TYPE: tinyipa
|
||||
BUILD_TIMEOUT: 900
|
||||
IRONIC_BUILD_DEPLOY_RAMDISK: True
|
||||
IRONIC_TEMPEST_BUILD_TIMEOUT: 900
|
||||
|
Loading…
Reference in New Issue
Block a user