You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by dj...@apache.org on 2020/02/18 19:30:29 UTC

[cassandra-dtest] branch master updated: Add test to ensure default keyspaces are present in cqlsh output

This is an automated email from the ASF dual-hosted git repository.

djoshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/master by this push:
     new 467192e  Add test to ensure default keyspaces are present in cqlsh output
467192e is described below

commit 467192eb1e5b350e8b89009884b7c1acf9501470
Author: Dinesh A. Joshi <di...@apple.com>
AuthorDate: Mon Feb 17 16:39:32 2020 -0800

    Add test to ensure default keyspaces are present in cqlsh output
    
    Patch by Dinesh Joshi; reviewed by Jon Haddad and David Capwell for CASSANDRA-15576
---
 cqlsh_tests/test_cqlsh.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/cqlsh_tests/test_cqlsh.py b/cqlsh_tests/test_cqlsh.py
index c9a11e2..ed93d9d 100644
--- a/cqlsh_tests/test_cqlsh.py
+++ b/cqlsh_tests/test_cqlsh.py
@@ -879,6 +879,27 @@ CREATE AGGREGATE test.average(int)
         # describe aggregate functions
         self.execute(cql='DESCRIBE AGGREGATE test.average', expected_output=describe_aggregate_expected)
 
+    @since('4.0')
+    def test_default_keyspaces_exist(self):
+        self.cluster.populate(1)
+        self.cluster.start(wait_for_binary_proto=True)
+        node1, = self.cluster.nodelist()
+
+        # Describe keyspaces
+        expected_keyspaces = ['system_schema', 'system', 'system_traces', 'system_views',
+                              'system_auth', 'system_distributed', 'system_virtual_schema']
+
+        node1, = self.cluster.nodelist()
+        output, err = self.run_cqlsh(node1, "DESCRIBE KEYSPACES")
+
+        if err:
+            assert False, err
+
+        stripped_response = re.sub("(\n|\t|\s+)", " ", output).strip()
+        keyspaces = stripped_response.split(" ")
+
+        assert sorted(keyspaces) == sorted(expected_keyspaces)
+
     def test_describe_types(self):
         """Test DESCRIBE statements for user defined datatypes"""
         self.cluster.populate(1)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org