mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Merge pull request #20248 from qoega/integration-2
This commit is contained in:
commit
1fdc59b453
@ -18,22 +18,22 @@ def started_cluster():
|
|||||||
|
|
||||||
|
|
||||||
def test_access_control_on_cluster():
|
def test_access_control_on_cluster():
|
||||||
ch1.query("CREATE USER Alex ON CLUSTER 'cluster'")
|
ch1.query_with_retry("CREATE USER Alex ON CLUSTER 'cluster'", retry_count=3)
|
||||||
assert ch1.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n"
|
assert ch1.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n"
|
||||||
assert ch2.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n"
|
assert ch2.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n"
|
||||||
assert ch3.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n"
|
assert ch3.query("SHOW CREATE USER Alex") == "CREATE USER Alex\n"
|
||||||
|
|
||||||
ch2.query("GRANT ON CLUSTER 'cluster' SELECT ON *.* TO Alex")
|
ch2.query_with_retry("GRANT ON CLUSTER 'cluster' SELECT ON *.* TO Alex", retry_count=3)
|
||||||
assert ch1.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n"
|
assert ch1.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n"
|
||||||
assert ch2.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n"
|
assert ch2.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n"
|
||||||
assert ch3.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n"
|
assert ch3.query("SHOW GRANTS FOR Alex") == "GRANT SELECT ON *.* TO Alex\n"
|
||||||
|
|
||||||
ch3.query("REVOKE ON CLUSTER 'cluster' SELECT ON *.* FROM Alex")
|
ch3.query_with_retry("REVOKE ON CLUSTER 'cluster' SELECT ON *.* FROM Alex", retry_count=3)
|
||||||
assert ch1.query("SHOW GRANTS FOR Alex") == ""
|
assert ch1.query("SHOW GRANTS FOR Alex") == ""
|
||||||
assert ch2.query("SHOW GRANTS FOR Alex") == ""
|
assert ch2.query("SHOW GRANTS FOR Alex") == ""
|
||||||
assert ch3.query("SHOW GRANTS FOR Alex") == ""
|
assert ch3.query("SHOW GRANTS FOR Alex") == ""
|
||||||
|
|
||||||
ch2.query("DROP USER Alex ON CLUSTER 'cluster'")
|
ch2.query_with_retry("DROP USER Alex ON CLUSTER 'cluster'", retry_count=3)
|
||||||
assert "There is no user `Alex`" in ch1.query_and_get_error("SHOW CREATE USER Alex")
|
assert "There is no user `Alex`" in ch1.query_and_get_error("SHOW CREATE USER Alex")
|
||||||
assert "There is no user `Alex`" in ch2.query_and_get_error("SHOW CREATE USER Alex")
|
assert "There is no user `Alex`" in ch2.query_and_get_error("SHOW CREATE USER Alex")
|
||||||
assert "There is no user `Alex`" in ch3.query_and_get_error("SHOW CREATE USER Alex")
|
assert "There is no user `Alex`" in ch3.query_and_get_error("SHOW CREATE USER Alex")
|
||||||
|
@ -70,14 +70,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_SIMPLE))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_COMPLEX))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -69,14 +69,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_SIMPLE))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_COMPLEX))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -71,14 +71,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", list(set(LAYOUTS_SIMPLE).difference(set("cache"))) )
|
@pytest.mark.parametrize("layout_name", sorted(list(set(LAYOUTS_SIMPLE).difference(set("cache"))) ))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", list(set(LAYOUTS_COMPLEX).difference(set("complex_key_cache"))))
|
@pytest.mark.parametrize("layout_name", sorted(list(set(LAYOUTS_COMPLEX).difference(set("complex_key_cache")))))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -77,6 +77,6 @@ def test_simple(started_cluster, layout_name):
|
|||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -69,14 +69,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", set(LAYOUTS_SIMPLE).difference({'cache', 'direct'}) )
|
@pytest.mark.parametrize("layout_name", sorted(set(LAYOUTS_SIMPLE).difference({'cache', 'direct'})) )
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", list(set(LAYOUTS_COMPLEX).difference({'complex_key_cache', 'complex_key_direct'})))
|
@pytest.mark.parametrize("layout_name", sorted(list(set(LAYOUTS_COMPLEX).difference({'complex_key_cache', 'complex_key_direct'}))))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -71,14 +71,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_SIMPLE))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_COMPLEX))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -71,14 +71,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_SIMPLE))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_COMPLEX))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -69,14 +69,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_SIMPLE))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_COMPLEX))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
@ -70,14 +70,14 @@ def started_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_SIMPLE)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_SIMPLE))
|
||||||
def test_simple(started_cluster, layout_name):
|
def test_simple(started_cluster, layout_name):
|
||||||
simple_tester.execute(layout_name, node)
|
simple_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_COMPLEX)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_COMPLEX))
|
||||||
def test_complex(started_cluster, layout_name):
|
def test_complex(started_cluster, layout_name):
|
||||||
complex_tester.execute(layout_name, node)
|
complex_tester.execute(layout_name, node)
|
||||||
|
|
||||||
@pytest.mark.parametrize("layout_name", LAYOUTS_RANGED)
|
@pytest.mark.parametrize("layout_name", sorted(LAYOUTS_RANGED))
|
||||||
def test_ranged(started_cluster, layout_name):
|
def test_ranged(started_cluster, layout_name):
|
||||||
ranged_tester.execute(layout_name, node)
|
ranged_tester.execute(layout_name, node)
|
||||||
|
Loading…
Reference in New Issue
Block a user