Skip to content

Commit 0e67069

Browse files
Execute a query as a custom user
1 parent 946575a commit 0e67069

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/bwc/test_rolling_upgrade.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _test_rolling_upgrade(self, path, nodes):
6161
cluster.start()
6262
with connect(cluster.node().http_url, error_trace=True) as conn:
6363
c = conn.cursor()
64-
c.execute("create user arthur")
64+
c.execute("create user arthur with (password = 'secret')")
6565
c.execute("grant dql to arthur")
6666
c.execute(f'''
6767
CREATE TABLE doc.t1 (
@@ -110,6 +110,13 @@ def _test_rolling_upgrade(self, path, nodes):
110110

111111
print(f" upgrade node {idx} to {path.to_version}")
112112
new_node = self.upgrade_node(node, path.to_version)
113+
114+
# Run a query as a user created on an older version (ensure user is read correctly from cluster state, auth works, etc)
115+
with connect(cluster.node().http_url, username='arthur', password='secret', error_trace=True) as custom_user_conn:
116+
c = custom_user_conn.cursor()
117+
wait_for_active_shards(c, expected_active_shards)
118+
c.execute("SELECT 1")
119+
113120
cluster[idx] = new_node
114121
with connect(new_node.http_url, error_trace=True) as conn:
115122
c = conn.cursor()

0 commit comments

Comments
 (0)