Bump jsonschema minimum to 4.0.0
This allows us to drop some logic from tests. Change-Id: Idc11c1ce6e208774314a5a867789958372f0d591 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
2709e30956
commit
44f4f2f81b
|
@ -13,14 +13,12 @@
|
|||
import copy
|
||||
import ddt
|
||||
import fixtures
|
||||
import importlib.metadata
|
||||
import microversion_parse
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
from oslo_utils.fixture import uuidsentinel
|
||||
from oslotest import base
|
||||
from packaging import version
|
||||
|
||||
from nova.compute import provider_config
|
||||
from nova import exception as nova_exc
|
||||
|
@ -119,17 +117,6 @@ class SchemaValidationTestCasesV1(SchemaValidationMixin):
|
|||
@ddt.unpack
|
||||
@ddt.file_data('provider_config_data/v1/validation_error_test_data.yaml')
|
||||
def test_validation_errors(self, config, expected_messages):
|
||||
# TODO(stephenfin): Drop this once we no longer support jsonschema 3.x
|
||||
jsonschema_version = importlib.metadata.version('jsonschema')
|
||||
if version.parse(jsonschema_version) < version.parse('4.0.0'):
|
||||
if expected_messages == [
|
||||
"should not be valid under {}",
|
||||
"validating 'not' in schema['properties']['__source_file']",
|
||||
]:
|
||||
expected_messages = [
|
||||
"{} is not allowed for",
|
||||
"validating 'not' in schema['properties']['__source_file']", # noqa: E501
|
||||
]
|
||||
self.run_test_validation_errors(config, expected_messages)
|
||||
|
||||
@ddt.unpack
|
||||
|
|
|
@ -22,7 +22,7 @@ netaddr>=0.7.18 # BSD
|
|||
netifaces>=0.10.4 # MIT
|
||||
paramiko>=2.7.1 # LGPLv2.1+
|
||||
iso8601>=0.1.11 # MIT
|
||||
jsonschema>=3.2.0 # MIT
|
||||
jsonschema>=4.0.0 # MIT
|
||||
python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0
|
||||
keystoneauth1>=3.16.0 # Apache-2.0
|
||||
python-neutronclient>=7.1.0 # Apache-2.0
|
||||
|
@ -66,4 +66,3 @@ python-dateutil>=2.7.0 # BSD
|
|||
futurist>=1.8.0 # Apache-2.0
|
||||
openstacksdk>=0.35.0 # Apache-2.0
|
||||
PyYAML>=5.1 # MIT
|
||||
packaging>=21.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue