Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_api_client.TestStorageApi::test_types
Failed

TEST RESULT

Run At
Jul 27 2021, 5:40 PM
Details
self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7f0f68a27e48> swh_storage_backend_config = {'check_config': {'check_write': True}, 'cls': 'postgresql', 'db': "dbname=storage user=postgres host=127.0.0.1 port=16058 options=''", 'journal_writer': {'cls': 'memory'}, ...} def test_types(self, swh_storage_backend_config): """Checks all methods of StorageInterface are implemented by this backend, and that they have the same signature.""" # Create an instance of the protocol (which cannot be instantiated # directly, so this creates a subclass, then instantiates it) interface = type("_", (StorageInterface,), {})() > storage = get_storage(**swh_storage_backend_config) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = 'postgresql' kwargs = {'db': "dbname=storage user=postgres host=127.0.0.1 port=16058 options=''", 'journal_writer': {'cls': 'memory'}, 'objstorage': {'cls': 'memory'}} class_path = '.postgresql.storage.Storage', module_path = '.postgresql.storage' class_name = 'Storage' module = <module 'swh.storage.postgresql.storage' from '/var/lib/jenkins/workspace/DSTO/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/storage/postgresql/storage.py'> Storage = <class 'swh.storage.postgresql.storage.Storage'> check_config = {'check_write': True} storage = <swh.storage.postgresql.storage.Storage object at 0x7f0f6887a940> def get_storage(cls: str, **kwargs) -> "StorageInterface": """Get a storage object of class `storage_class` with arguments `storage_args`. Args: cls (str): storage's class, can be: - ``local`` to use a postgresql database - ``cassandra`` to use a cassandra database - ``remote`` to connect to a swh-storage server - ``memory`` for an in-memory storage, useful for fast tests - ``filter``, ``buffer``, ... to use specific storage "proxies", see their respective documentations args (dict): dictionary with keys Returns: an instance of swh.storage.Storage or compatible class Raises: ValueError if passed an unknown storage class. """ if "args" in kwargs: warnings.warn( 'Explicit "args" key is deprecated, use keys directly instead.', DeprecationWarning, ) kwargs = kwargs["args"] if cls == "pipeline": return get_storage_pipeline(**kwargs) if cls == "local": warnings.warn( 'The "local" storage class is deprecated, use "postgresql" instead.', DeprecationWarning, ) class_path = STORAGE_IMPLEMENTATIONS.get(cls) if class_path is None: raise ValueError( "Unknown storage class `%s`. Supported: %s" % (cls, ", ".join(STORAGE_IMPLEMENTATIONS)) ) (module_path, class_name) = class_path.rsplit(".", 1) module = importlib.import_module(module_path, package=__package__) Storage = getattr(module, class_name) check_config = kwargs.pop("check_config", {}) storage = Storage(**kwargs) if check_config: if not storage.check_config(**check_config): > raise EnvironmentError("storage check config failed") E OSError: storage check config failed .tox/py3/lib/python3.7/site-packages/swh/storage/__init__.py:82: OSError