mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-06 15:03:06 +00:00
Ever since we started testing Alternator with tests written in Python and using Amazon's "boto3" library, one limitation kept annoying us: Boto3 verifies the validity of the request parameters before passing them on to the server. It verifies that mandatory parameters are not missing, that parameters have the right types, and sometimes even the right ranges - all in the library before ever sending the request. This meant that in many cases, we couldn't get good test coverage for Alternator's server-side handling of *wrong* parameters. As it turns out, it is trivial to tell boto3 to *not* do its client-side request validation, with the `parameter_validation=False` config flag. We just never noticed that such a flag existed :-) So this patch adds this flag. It then fixes a few tests which expected ParameterValidationError - this error is the client-side validation failure, but should now be replaced by checking the server-side error. The patch also adds a couple of invalid parameter checks that we couldn't do before because of boto3's eagerness to check them on the client side. We can add a lot more of these error tests in the future, now that we got rid of client-side validation. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20211005095514.537226-1-nyh@scylladb.com>