Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
Description
We only have minimal test coverage of IF [NOT] EXISTS conditions for DDL statements. I think dtests are the right place to add those tests.
We need to cover:
- CREATE KEYSPACE IF NOT EXISTS
- DROP KEYSPACE IF EXISTS
- CREATE TABLE IF NOT EXISTS
- DROP TABLE IF EXISTS
- CREATE INDEX IF NOT EXISTS
- DROP INDEX IF EXISTS
- CREATE TYPE IF NOT EXISTS
- DROP TYPE IF EXISTS
The tests should also ensure that InvalidRequestExceptions are thrown if, for example, you try to drop an index from a keyspace that doesn't exist (regardless of whether IF EXISTS is used).