Add test to verify that it is possible to list roles after a successful login (CASSANDRA-13640)
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/da6ad831 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/da6ad831 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/da6ad831 Branch: refs/heads/master Commit: da6ad8317e18ebaa5e8b428df79d1da086a19dd9 Parents: 1a0e266 Author: AndreÌs de la PenÌa <a.penya.gar...@gmail.com> Authored: Thu Aug 24 16:47:58 2017 +0100 Committer: AndreÌs de la PenÌa <a.penya.gar...@gmail.com> Committed: Thu Aug 24 16:47:58 2017 +0100 ---------------------------------------------------------------------- cqlsh_tests/cqlsh_tests.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/da6ad831/cqlsh_tests/cqlsh_tests.py ---------------------------------------------------------------------- diff --git a/cqlsh_tests/cqlsh_tests.py b/cqlsh_tests/cqlsh_tests.py index 418b9f7..8b66a53 100644 --- a/cqlsh_tests/cqlsh_tests.py +++ b/cqlsh_tests/cqlsh_tests.py @@ -2032,3 +2032,19 @@ class CqlLoginTest(Tester): cqlsh_options=['-u', 'cassandra', '-p', 'cassandra']) self.assertEqual([x for x in cqlsh_stdout.split() if x], ['ks1table']) self.assert_login_not_allowed('user1', cqlsh_stderr) + + def test_list_roles_after_login(self): + """ + @jira_ticket CASSANDRA-13640 + + Verifies that it is possible to list roles after a successful login. + """ + out, err, _ = self.node1.run_cqlsh( + ''' + CREATE ROLE super WITH superuser = true AND password = 'p' AND login = true; + LOGIN super 'p'; + LIST ROLES; + ''', + cqlsh_options=['-u', 'cassandra', '-p', 'cassandra']) + self.assertTrue('super' in out) + self.assertEqual('', err) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org