swh_scheduler_config = {'db': "dbname=scheduler user=postgres host=127.0.0.1 port=18864 options=''"}
def test_get_lister(swh_scheduler_config):
"""Instantiating a supported lister should be ok
"""
# Drop launchpad lister from the lister to check, its test setup is more involved
# than the other listers and it's not currently done here
for lister_name in SUPPORTED_LISTERS:
lst = get_lister(
lister_name,
scheduler={"cls": "local", **swh_scheduler_config},
> **lister_args.get(lister_name, {}),
)
.tox/py3/lib/python3.7/site-packages/swh/lister/tests/test_cli.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/lister/__init__.py:57: in get_lister
return lister_cls.from_config(**conf)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'swh.lister.tuleap.lister.TuleapLister'>
scheduler = {'cls': 'local', 'db': "dbname=scheduler user=postgres host=127.0.0.1 port=18864 options=''"}
config = {}, legacy_key = 'celery'
scheduler_instance = <swh.scheduler.backend.SchedulerBackend object at 0x7fbf33ee84e0>
@classmethod
def from_config(cls, scheduler: Dict[str, Any], **config: Any):
"""Instantiate a lister from a configuration dict.
This is basically a backwards-compatibility shim for the CLI.
Args:
scheduler: instantiation config for the scheduler
config: the configuration dict for the lister, with the following keys:
- credentials (optional): credentials list for the scheduler
- any other kwargs passed to the lister.
Returns:
the instantiated lister
"""
# Drop the legacy config keys which aren't used for this generation of listers.
for legacy_key in ("storage", "lister", "celery"):
config.pop(legacy_key, None)
# Instantiate the scheduler
scheduler_instance = get_scheduler(**scheduler)
> return cls(scheduler=scheduler_instance, **config)
E TypeError: __init__() missing 1 required positional argument: 'url'
.tox/py3/lib/python3.7/site-packages/swh/lister/pattern.py:255: TypeError
TEST RESULT
TEST RESULT
- Run At
- May 19 2021, 2:52 PM