If a CQL session USEs a keyspace and then calls DESC TABLES, the user expects to see only the tables in the chosen keyspace. However, calling DESC KEYSPACES should still return list all the keyspaces - returning just the USEd one is not useful - and also not what Cassandra does. We had an xfailing test test_describe.py::test_keyspaces_with_use which reproduces this bug (and passes on Cassandra). In this patch we fix this bug. The fix is simple - USE should affect DESC statements, but be ignored for DESC KEYSPACES. We can then remove the xfail marker from the test. The patch also includes a new test for the DESC TABLES case, where the USE *does* have an affect. And I wanted to make sure the patch doesn't break this case. As usual, the new test passes on both Cassandra and ScyllaDB. Fixes #26334 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes scylladb/scylladb#27971
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.