diff --git a/swh/objstorage/api/server.py b/swh/objstorage/api/server.py --- a/swh/objstorage/api/server.py +++ b/swh/objstorage/api/server.py @@ -255,9 +255,6 @@ % (", ".join(missing_keys),) ) - elif cls == "noop": - raise EnvironmentError("Noop implementations should not be used in production.") - return cfg diff --git a/swh/objstorage/tests/test_server.py b/swh/objstorage/tests/test_server.py --- a/swh/objstorage/tests/test_server.py +++ b/swh/objstorage/tests/test_server.py @@ -106,6 +106,7 @@ pytest.param( {"client_max_size": "10", "objstorage": {"cls": "memory"}}, id="empty-args" ), + pytest.param({"objstorage": {"cls": "noop",}}, id="noop",), ], ) def test_load_and_check_config(tmpdir, config): @@ -113,13 +114,3 @@ config_path = prepare_config_file(tmpdir, config) cfg = load_and_check_config(config_path) assert cfg == config - - -@pytest.mark.parametrize( - "config", [pytest.param({"objstorage": {"cls": "noop",}}, id="noop",),], -) -def test_load_and_check_config_raise(tmpdir, config): - """pathslicing configuration fine loads ok""" - config_path = prepare_config_file(tmpdir, config) - with pytest.raises(EnvironmentError, match="not be used in production"): - load_and_check_config(config_path)