You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2021/09/06 19:02:04 UTC

[cassandra-dtest] branch trunk updated: ninja: fix version checks in TestNetworkAuth

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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 573573d  ninja: fix version checks in TestNetworkAuth
573573d is described below

commit 573573d92d5c5b8716a0673444fafd36b3d83de2
Author: Sam Tunnicliffe <sa...@apple.com>
AuthorDate: Mon Sep 6 19:45:36 2021 +0100

    ninja: fix version checks in TestNetworkAuth
    
    Follow up to CASSANDRA-16404
---
 auth_test.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/auth_test.py b/auth_test.py
index bd46688..a85bca5 100644
--- a/auth_test.py
+++ b/auth_test.py
@@ -3114,7 +3114,7 @@ class TestNetworkAuth(Tester):
             self.clear_network_auth_cache(self.dc2_node, cache_name)
             self.assertUnauthorized(lambda: session.execute("SELECT * FROM ks.tbl"))
 
-        if self.dtest_config.cassandra_version_from_build > '4.0':
+        if self.dtest_config.cassandra_version_from_build >= '4.1':
             test_revoked_access("NetworkPermissionsCache")
 
         # deprecated cache name, scheduled for removal in 5.0
@@ -3155,7 +3155,10 @@ class TestNetworkAuth(Tester):
         session = self.exclusive_cql_connection(self.dc2_node, user=username, password='password')
         superuser.execute("ALTER ROLE %s WITH LOGIN=false" % username)
         self.clear_roles_cache(self.dc2_node)
-        self.clear_network_auth_cache(self.dc2_node)
+
+        cache_name = "NetworkPermissionsCache" if self.dtest_config.cassandra_version_from_build >= '4.1' else "NetworkAuthCache"
+        self.clear_network_auth_cache(self.dc2_node, cache_name)
+
         self.assertUnauthorized(lambda: session.execute("SELECT * FROM ks.tbl"))
 
 

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