mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-25 09:11:10 +00:00
Refs #10087 Add validation of all params for the keyspace_scrub api. The validation method is generic and should be used by all apis eventually, but I'm leaving that as follow-up work. While at it, fixed the exception types thrown on invalid `scrub_mode` or `quarantine_mode` values from `std::runtime_error` to `httpd::bad_param_exception` so to generate the `bad_request` http status. And added unit tests to verify that, and the handling of an unknown parameter. Test: unit(dev) DTest: nodetool_additional_test.py::TestNodetool::{test_scrub_with_one_node_expect_data_loss,test_scrub_with_multi_nodes_expect_data_rebuild,test_scrub_sstable_with_invalid_fragment,test_scrub_ks_sstable_with_invalid_fragment,test_scrub_segregate_sstable_with_invalid_fragment,test_scrub_segregate_ks_sstable_with_invalid_fragment} Closes #10090 * github.com:scylladb/scylla: api: storage_service: scrub: validate parameters api: storage_service: refactor parse_tables api: storage_service: refactor validate_keyspace test: rest_api: add test_storage_service_keyspace_scrub tests api: storage_service: scrub: throw httpd::bad_param_exception for invalid param values