From bf4050ed159d4024aa8d0ba3d6e793bcb994f14a Mon Sep 17 00:00:00 2001 From: Juliusz Stasiewicz Date: Tue, 2 Jun 2020 16:46:35 +0200 Subject: [PATCH] test/cql: Check that CDC for counters is disallowed This test must be removed once we have implementation of CDC for tables with counter columns. --- .../cdc_disallow_cdc_for_counters_test.cql | 7 ++++++ .../cdc_disallow_cdc_for_counters_test.result | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 test/cql/cdc_disallow_cdc_for_counters_test.cql create mode 100644 test/cql/cdc_disallow_cdc_for_counters_test.result diff --git a/test/cql/cdc_disallow_cdc_for_counters_test.cql b/test/cql/cdc_disallow_cdc_for_counters_test.cql new file mode 100644 index 0000000000..239908edfb --- /dev/null +++ b/test/cql/cdc_disallow_cdc_for_counters_test.cql @@ -0,0 +1,7 @@ +create table tb1 (pk int primary key, c1 counter) with cdc = {'enabled': true}; + +create table tb2 (pk int primary key, c1 counter); +alter table tb2 with cdc = {'enabled': true}; + +create table tb3 (pk int primary key) with cdc = {'enabled': true}; +alter table tb3 add (c1 counter); \ No newline at end of file diff --git a/test/cql/cdc_disallow_cdc_for_counters_test.result b/test/cql/cdc_disallow_cdc_for_counters_test.result new file mode 100644 index 0000000000..a714f9da65 --- /dev/null +++ b/test/cql/cdc_disallow_cdc_for_counters_test.result @@ -0,0 +1,25 @@ +create table tb1 (pk int primary key, c1 counter) with cdc = {'enabled': true}; +{ + "message" : "exceptions::invalid_request_exception (Cannot create CDC log for table ks.tb1. Counter support not implemented)", + "status" : "error" +} + +create table tb2 (pk int primary key, c1 counter); +{ + "status" : "ok" +} +alter table tb2 with cdc = {'enabled': true}; +{ + "message" : "exceptions::invalid_request_exception (Cannot create CDC log for table ks.tb2. Counter support not implemented)", + "status" : "error" +} + +create table tb3 (pk int primary key) with cdc = {'enabled': true}; +{ + "status" : "ok" +} +alter table tb3 add (c1 counter); +{ + "message" : "exceptions::invalid_request_exception (Cannot create CDC log for table ks.tb3. Counter support not implemented)", + "status" : "error" +}