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 @@ -118,8 +118,7 @@ @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""" +def test_load_and_check_config_with_noop(tmpdir, config): + """noop objstorage configuration is allowed""" config_path = prepare_config_file(tmpdir, config) - with pytest.raises(EnvironmentError, match="not be used in production"): - load_and_check_config(config_path) + load_and_check_config(config_path)