testsuite incompatible with jsonschema 3.0.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
proliantutils |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
when running tests against jsonschema 3.0.1, you get various failures, like e.g.
[ 90s] FAIL: proliantutils.
[ 90s] tags: worker-4
[ 90s] -------
[ 90s] Traceback (most recent call last):
[ 90s] File "/usr/lib/
[ 90s] return func(*args, **keywargs)
[ 90s] File "proliantutils/
[ 90s] raid_info)
[ 90s] File "/usr/lib/
[ 90s] self.assertThat
[ 90s] File "/usr/lib/
[ 90s] mismatch_error = self._matchHelp
[ 90s] File "/usr/lib/
[ 90s] mismatch = matcher.
[ 90s] File "/usr/lib/
[ 90s] mismatch = self.exception_
[ 90s] File "/usr/lib/
[ 90s] mismatch = matcher.
[ 90s] File "/usr/lib/
[ 90s] reraise(*matchee)
[ 90s] File "/usr/lib/
[ 90s] result = matchee()
[ 90s] File "/usr/lib/
[ 90s] return self._callable_
[ 90s] File "proliantutils/
[ 90s] validate(
[ 90s] File "proliantutils/
[ 90s] jsonschema.
[ 90s] File "/usr/lib/
[ 90s] cls.check_
[ 90s] File "/usr/lib/
[ 90s] raise exceptions.
[ 90s] jsonschema.
rties': {u'size_gb': {u'anyOf': [{u'exclusiveMi
ription': u"Size in GiB (Integer) for the logical disk. Use 'MAX' as size_gb if this logical disk is supposed to use the rest of the space availab
le. Required."}, u'physical_disks': {u'items': {u'type': u'string'}, u'type': u'array', u'description': u'The physical disks to use for this logic
al disk. Optional'}, u'interface_type': {u'enum': [u'sata', u'scsi', u'sas'], u'type': u'string', u'description': u"Specifies the interface type o
f disk. Valid values are 'sata', 'scsi' and 'sas'. Optional."}, u'number_
[ 90s]
[ 90s] Failed validating u'anyOf' in metaschema[
[ 90s] {u'anyOf': [{u'$ref': u'#'}, {u'$ref': u'#/definitions
[ 90s] u'default': True}
[ 90s]
[ 90s] On schema[
[ 90s] {u'additionalPr
[ 90s] u'properties': {u'controller': {u'description': u'Controller to use for this logical disk. Optional.',
[ 90s] u'type': u'string'},
[ 90s] u'disk_type': {u'description': u"Specifies the type of disk preferred. Valid values are 'hdd' and 'ssd'. Optional.",
[ 90s] u'enum': [u'hdd', u'ssd'],
[ 90s] u'type': u'string'},
[ 90s] u'interface_type': {u'description': u"Specifies the interface type of disk. Valid values are 'sata', 'scsi' and 'sas
'. Optional.",
[ 90s] u'enum': [u'sata',
[ 90s] u'scsi',
[ 90s] u'sas'],
[ 90s] u'type': u'string'},
[ 90s] u'is_root_volume': {u'description': u'Specifies whether this disk is a root volume. Optional.',
[ 90s] u'type': u'boolean'},
[ 90s] u'number_
[ 90s] u'exclusiveMini
[ 90s] u'minimum': 0,
[ 90s] u'type': u'integer'},
[ 90s] u'physical_disks': {u'description': u'The physical disks to use for this logical disk. Optional',
[ 90s] u'items': {u'type': u'string'},
[ 90s] u'type': u'array'},
[ 90s] u'raid_level': {u'description': u'RAID level for the logical disk. Required.',
[ 90s] u'enum': [u'0',
[ 90s] u'1',
[ 90s] u'5',
[ 90s] u'6',
[ 90s] u'10',
[ 90s] u'50',
[ 90s] u'60',
[ 90s] u'1+0',
[ 90s] u'5+0',
[ 90s] u'6+0'],
[ 90s] u'type': u'string'},
[ 90s] u'share_
logical disk. Optional.',
[ 90s] u'type': u'boolean'},
[ 90s] u'size_gb': {u'anyOf': [{u'exclusiveMi
[ 90s] u'minimum': 0,
[ 90s] u'type': u'integer'},
[ 90s] {u'enum': [u'MAX'],
[ 90s] u'type': u'string'}],
[ 90s] u'description': u"Size in GiB (Integer) for the logical disk. Use 'MAX' as size_gb if this logical disk
is supposed to use the rest of the space available. Required."},
[ 90s] u'volume_name': {u'description': u'Name of the volume to be created. Optional.',
[ 90s] u'type': u'string'}},
[ 90s] u'required': [u'raid_level', u'size_gb'],
[ 90s] u'type': u'object'}
Thank you Dirk for reaching out. Will triage this defect.
Regards
Shiv
On Wed, Apr 10, 2019 at 1:05 PM Dirk Mueller <email address hidden>
wrote:
> Public bug reported: tests.hpssa. test_manager. ManagerTestCase s.test_ create_ configuration_ invalid_ logical_ disks ------- ------- ------- ------- ------- ------- ------- ------- ------- python2. 7/site- packages/ mock/mock. py", line tests/hpssa/ test_manager. py", line 113, in configuration_ invalid_ logical_ disks python2. 7/site- packages/ testtools/ testcase. py", (our_callable, matcher) python2. 7/site- packages/ testtools/ testcase. py", er(matchee, matcher, message, python2. 7/site- packages/ testtools/ testcase. py", match(matchee) python2. 7/site- packages/ testtools/ matchers/ _exception. py", line matcher. match(exc_ info) python2. 7/site- packages/ testtools/ matchers/ _higherorder. py", line match(matchee) python2. 7/site- packages/ testtools/ testcase. py", python2. 7/site- packages/ testtools/ matchers/ _exception. py", line python2. 7/site- packages/ testtools/ testcase. py", object( *self._ args, **self._kwargs) hpssa/manager. py", line 130, in configuration raid_config) hpssa/manager. py", line 52, in validate validate( raid_config, raid_config_schema) python2. 7/site- packages/ jsonschema/ validators. py", line 895, in schema( schema) python2. 7/site- packages/ jsonschema/ validators. py", line 289, in SchemaError. create_ from(error) exceptions. SchemaError: {u'additionalPr operties' : nimum': True, u'minimum':
>
> when running tests against jsonschema 3.0.1, you get various failures,
> like e.g.
>
> [ 90s] FAIL:
> proliantutils.
> [ 90s] tags: worker-4
> [ 90s]
> -------
> [ 90s] Traceback (most recent call last):
> [ 90s] File "/usr/lib/
> 1305, in patched
> [ 90s] return func(*args, **keywargs)
> [ 90s] File "proliantutils/
> test_create_
> [ 90s] raid_info)
> [ 90s] File "/usr/lib/
> line 485, in assertRaises
> [ 90s] self.assertThat
> [ 90s] File "/usr/lib/
> line 496, in assertThat
> [ 90s] mismatch_error = self._matchHelp
> verbose)
> [ 90s] File "/usr/lib/
> line 547, in _matchHelper
> [ 90s] mismatch = matcher.
> [ 90s] File
> "/usr/lib/
> 108, in match
> [ 90s] mismatch = self.exception_
> [ 90s] File
> "/usr/lib/
> 62, in match
> [ 90s] mismatch = matcher.
> [ 90s] File "/usr/lib/
> line 475, in match
> [ 90s] reraise(*matchee)
> [ 90s] File
> "/usr/lib/
> 101, in match
> [ 90s] result = matchee()
> [ 90s] File "/usr/lib/
> line 1049, in __call__
> [ 90s] return self._callable_
> [ 90s] File "proliantutils/
> create_
> [ 90s] validate(
> [ 90s] File "proliantutils/
> [ 90s] jsonschema.
> [ 90s] File
> "/usr/lib/
> validate
> [ 90s] cls.check_
> [ 90s] File
> "/usr/lib/
> check_schema
> [ 90s] raise exceptions.
> [ 90s] jsonschema.
> False, u'required': [u'raid_level', u'size_gb'], u'type': u'object', u'prope
> rties': {u'size_gb': {u'anyOf': [{u'exclusiveMi
> 0, u'type': u'integer'}, {u'enum': [u'MAX'], u'type': u'string'}], u'desc
> ription': u"Size in GiB (Integer) for the logical disk. Use 'MAX' as
> size_gb if this logical disk is supposed to use the rest of the space
> availab
> le. Required."}, u'physical_disks': {u'it...