Skip to content

Commit 90592e1

Browse files
pufitnikitamikhaylov
authored andcommitted
Add integration test
1 parent b1aad0f commit 90592e1

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

tests/integration/test_enable_user_name_access_type/__init__.py

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<clickhouse>
2+
<access_control_improvements>
3+
<enable_user_name_access_type>0</enable_user_name_access_type>
4+
</access_control_improvements>
5+
</clickhouse>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from helpers.cluster import ClickHouseCluster
2+
3+
4+
def test_startup_scripts():
5+
cluster = ClickHouseCluster(__file__)
6+
7+
node = cluster.add_instance(
8+
"node",
9+
main_configs=[
10+
"configs/access_control_settings.xml",
11+
],
12+
macros={"replica": "node", "shard": "node"},
13+
with_zookeeper=True,
14+
)
15+
16+
try:
17+
cluster.start()
18+
node.query("CREATE USER foobar")
19+
node.query("GRANT CREATE USER ON * TO foobar")
20+
assert (
21+
node.query(
22+
"SHOW GRANTS FOR foobar"
23+
)
24+
== "GRANT CREATE USER ON *.* TO foobar\n"
25+
)
26+
node.query("DROP USER foobar")
27+
finally:
28+
cluster.shutdown()

0 commit comments

Comments
 (0)