Skip to content
Snippets Groups Projects
Verified Commit 0ef7e397 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

scrubber.cli: Fix raised exception typo

This was found while deploying the new version.
parent 53970d52
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2022 The Software Heritage developers
# Copyright (C) 2022-2023 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -315,7 +315,7 @@ def scrubber_check_storage(
config_id = db.config_get_by_name(name)
if config_id is None:
raise click.ClickExceptino("A valid configuration name/id must be set")
raise click.ClickException("A valid configuration name/id must be set")
checker = StorageChecker(
db=ctx.obj["db"],
storage=get_storage(**conf["storage"]),
......
......@@ -199,6 +199,13 @@ def test_check_storage(mocker, scrubber_db, swh_storage):
assert result.output == ""
def test_check_storage_ko(mocker, scrubber_db, swh_storage):
# using the config id instead of the config name
result = invoke(scrubber_db, ["check", "storage"], storage=swh_storage)
assert result.exit_code == 1, result.output
assert result.output == "Error: A valid configuration name/id must be set\n"
def test_check_list(mocker, scrubber_db, swh_storage):
mocker.patch("swh.scrubber.get_scrubber_db", return_value=scrubber_db)
result = invoke(scrubber_db, ["check", "list"], storage=swh_storage)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment