Tests are failing with "'NoneType' object is not iterable"

Bug #2057908 reported by Karolina Kula
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-faults
New
Undecided
Unassigned

Bug Description

Hello,

Tests are failing in tox:

FAILED os_faults/tests/unit/test_os_faults.py::OSFaultsTestCase::test_config_with_services
FAILED os_faults/tests/unit/test_os_faults.py::OSFaultsTestCase::test_config_with_services_and_hosts
FAILED os_faults/tests/unit/test_os_faults.py::OSFaultsTestCase::test_connect_devstack
FAILED os_faults/tests/unit/test_os_faults.py::OSFaultsTestCase::test_connect_with_libvirt
FAILED os_faults/tests/unit/drivers/cloud/test_devstack.py::DevStackManagementTestCase::test_validate_services
FAILED os_faults/tests/unit/drivers/cloud/test_saltcloud.py::SaltCloudManagementTestCase::test_validate_services

Example traceback:

__________________ OSFaultsTestCase.test_connect_with_libvirt __________________
 'NoneType' object is not iterable
 During handling of the above exception, another exception occurred:
 NOTE: Incompatible Exception Representation, displaying natively:
 testtools.testresult.real._StringException: Traceback (most recent call last):
   File "/usr/lib/python3.9/site-packages/mock/mock.py", line 1346, in patched
     return func(*newargs, **newkeywargs)
   File "/builddir/build/BUILD/os_faults-0.2.7/os_faults/tests/unit/test_os_faults.py", line 113, in test_connect_with_libvirt
     destructor = os_faults.connect(self.cloud_config)
   File "/builddir/build/BUILD/os_faults-0.2.7/os_faults/__init__.py", line 155, in connect
     cloud_management.validate_services()
   File "/builddir/build/BUILD/os_faults-0.2.7/os_faults/api/cloud_management.py", line 58, in validate_services
     jsonschema.validate(service_conf['args'], cls.CONFIG_SCHEMA)
   File "/usr/lib/python3.9/site-packages/jsonschema/validators.py", line 1106, in validate
     cls.check_schema(schema)
   File "/usr/lib/python3.9/site-packages/jsonschema/validators.py", line 221, in check_schema
     raise exceptions.SchemaError.create_from(error)
 jsonschema.exceptions.SchemaError: [{'enum': ['tcp', 'udp']}, {'type': 'integer', 'minimum': 0, 'maximum': 65535}, {'enum': ['egress', 'ingress']}] is not of type 'object', 'boolean'

My suspect is version of jsonschema.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.