@pytest.fixture
def swh_storage():
storage_config = {
"cls": "pipeline",
"steps": [{"cls": "validate"}, {"cls": "memory"},],
}
> return get_storage(**storage_config)
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_validate.py:23:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/__init__.py:49: in get_storage
return get_storage_pipeline(**kwargs)
.tox/py3/lib/python3.7/site-packages/swh/storage/__init__.py:104: in get_storage_pipeline
return get_storage(**storage_config)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = 'validate'
kwargs = {'check_config': None, 'storage': {'check_config': None, 'cls': 'memory'}}
class_path = None
def get_storage(cls: str, **kwargs) -> StorageInterface:
"""Get a storage object of class `storage_class` with arguments
`storage_args`.
Args:
storage (dict): dictionary with keys:
- cls (str): storage's class, either local, remote, memory, filter,
buffer
- 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)
class_path = STORAGE_IMPLEMENTATIONS.get(cls)
if class_path is None:
raise ValueError(
"Unknown storage class `%s`. Supported: %s"
> % (cls, ", ".join(STORAGE_IMPLEMENTATIONS))
)
E ValueError: Unknown storage class `validate`. Supported: local, remote, memory, filter, buffer, retry, cassandra
.tox/py3/lib/python3.7/site-packages/swh/storage/__init__.py:55: ValueError
TEST RESULT
TEST RESULT
- Run At
- Aug 25 2020, 6:13 PM