cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cassandra-dtest git commit: Fix pytest.raises() argument names
Date Wed, 25 Jul 2018 07:21:30 GMT
Repository: cassandra-dtest
Updated Branches:
  refs/heads/master 194ad8a22 -> f210e532e


Fix pytest.raises() argument names

patch by Stefan Podkowinski; reviewed by Jason Brown for CASSANDRA-14545


Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/f210e532
Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/f210e532
Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/f210e532

Branch: refs/heads/master
Commit: f210e532ecb0bd6a9c1bc0cfb07a5b524fd37b6d
Parents: 194ad8a
Author: Stefan Podkowinski <stefan.podkowinski@1und1.de>
Authored: Wed Jun 27 09:26:45 2018 +0200
Committer: Stefan Podkowinski <stefan.podkowinski@1und1.de>
Committed: Wed Jul 25 09:20:06 2018 +0200

----------------------------------------------------------------------
 jmx_auth_test.py | 10 +++++-----
 rebuild_test.py  |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/f210e532/jmx_auth_test.py
----------------------------------------------------------------------
diff --git a/jmx_auth_test.py b/jmx_auth_test.py
index 99b227f..199e525 100644
--- a/jmx_auth_test.py
+++ b/jmx_auth_test.py
@@ -32,21 +32,21 @@ class TestJMXAuth(Tester):
         session.execute("GRANT DESCRIBE ON ALL MBEANS TO jmx_user")
         session.execute("CREATE ROLE test WITH LOGIN=true and PASSWORD='abc123'")
 
-        with pytest.raises(ToolError, matches=self.authentication_fail_message(node, 'baduser')):
+        with pytest.raises(ToolError, match=self.authentication_fail_message(node, 'baduser')):
             node.nodetool('-u baduser -pw abc123 gossipinfo')
 
-        with pytest.raises(ToolError, matches=self.authentication_fail_message(node, 'test')):
+        with pytest.raises(ToolError, match=self.authentication_fail_message(node, 'test')):
             node.nodetool('-u test -pw badpassword gossipinfo')
 
-        with pytest.raises(ToolError, matches="Required key 'username' is missing"):
+        with pytest.raises(ToolError, match="Required key 'username' is missing"):
             node.nodetool('gossipinfo')
 
         # role must have LOGIN attribute
-        with pytest.raises(ToolError, matches='jmx_user is not permitted to log in'):
+        with pytest.raises(ToolError, match='jmx_user is not permitted to log in'):
             node.nodetool('-u jmx_user -pw 321cba gossipinfo')
 
         # test doesn't yet have any privileges on the necessary JMX resources
-        with pytest.raises(ToolError, matches='Access Denied'):
+        with pytest.raises(ToolError, match='Access Denied'):
             node.nodetool('-u test -pw abc123 gossipinfo')
 
         session.execute("GRANT jmx_user TO test")

http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/f210e532/rebuild_test.py
----------------------------------------------------------------------
diff --git a/rebuild_test.py b/rebuild_test.py
index d04b2f9..7d90650 100644
--- a/rebuild_test.py
+++ b/rebuild_test.py
@@ -217,13 +217,13 @@ class TestRebuild(Tester):
         node3.byteman_submit(script)
 
         # First rebuild must fail and data must be incomplete
-        with pytest.raises(ToolError, msg='Unexpected: SUCCEED'):
+        with pytest.raises(ToolError, message='Unexpected: SUCCEED'):
             logger.debug('Executing first rebuild -> '),
             node3.nodetool('rebuild dc1')
         logger.debug('Expected: FAILED')
 
         session.execute('USE ks')
-        with pytest.raises(AssertionError, msg='Unexpected: COMPLETE'):
+        with pytest.raises(AssertionError, message='Unexpected: COMPLETE'):
             logger.debug('Checking data is complete -> '),
             for i in range(0, 20000):
                 query_c1c2(session, i, ConsistencyLevel.LOCAL_ONE)


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


Mime
View raw message