Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.vault.tests.test_server::test_check_config_ok[scheduler]
Failed

TEST RESULT

Run At
Oct 23 2020, 6:57 PM
Details
missing_key = 'scheduler' swh_vault_config = {'cache': {'args': {'allow_delete': True, 'root': '/tmp/pytest-of-jenkins/pytest-0/test_check_config_ok_scheduler0', '...oot': '/tmp/pytest-of-jenkins/pytest-0/test_check_config_ok_scheduler0', 'slicing': '0:1/1:5'}, 'cls': 'pathslicing'}}} @pytest.mark.parametrize("missing_key", ["storage", "cache", "scheduler"]) def test_check_config_ok(missing_key, swh_vault_config) -> None: """Any other configuration than 'local' (the default) is rejected""" config_ok = {"vault": {"cls": "local", **swh_vault_config}} > assert check_config(config_ok) is not None .tox/py3/lib/python3.7/site-packages/swh/vault/tests/test_server.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cfg = {'vault': {'cache': {'args': {'allow_delete': True, 'root': '/tmp/pytest-of-jenkins/pytest-0/test_check_config_ok_sche...stgres host=127.0.0.1 port=13272 options=''", 'scheduler': {'cls': 'remote', 'url': 'http://swh-scheduler:5008'}, ...}} def check_config(cfg: Dict[str, Any]) -> Dict[str, Any]: """Ensure the configuration is ok to run a local vault server Raises: EnvironmentError if the configuration is not for local instance ValueError if one of the following keys is missing: vault, cache, storage, scheduler Returns: Configuration dict to instantiate a local vault server instance """ if "vault" not in cfg: raise ValueError("missing 'vault' configuration") vcfg = cfg["vault"] if vcfg["cls"] != "local": raise EnvironmentError( "The vault backend can only be started with a 'local' configuration", ) > args = {**vcfg, **vcfg.get("args")} E TypeError: 'NoneType' object is not a mapping .tox/py3/lib/python3.7/site-packages/swh/vault/api/server.py:71: TypeError