mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
to 1024 bytes, and the entire item to 400 KB which therefore also limits the size of one attribute. This test checks that we can reach up to these limits, with binary keys and attributes. The test does *not* check what happens once we exceed these limits. In such a case, DynamoDB throws an error (I checked that manually) but Alternator currently simply succeeds. If in the future we decide to add artificial limits to Alternator as well, we should add such tests as well. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Tests for Alternator that should also pass, identically, against DynamoDB.
Tests use the boto3 library for AWS API, and the pytest frameworks (both are available from Linux distributions, or with "pip install").
The files ~/.aws/credentials should be configure with your AWS key:
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
and ~/.aws/config with the default region to use in the test:
[default]
region = us-east-1
- Running "pytest" runs all tests.
- To run all tests in a single file, do
pytest test_table.py. - To run a single specific test, do
pytest test_table.py::test_create_table_unsupported_names. - To run tests against a local Scylla installation at http://localhost:8000, add "--local".
For example -
pytest --local test_item.pyorpytest --local. - Additional useful pytest options, especially useful for debugging tests:
- -v: show the names of each individual test running instead of just dots.
- -s: show the full output of running tests (by default, pytest captures the test's output and only displays it if a test fails)