Fix integration tests

This commit is contained in:
ANDREI STAROVEROV 2021-07-21 14:10:37 +03:00
parent 503d62cce1
commit 1c99253c6a
2 changed files with 3 additions and 5 deletions

View File

@ -40,7 +40,7 @@ def test_access_rights_for_funtion():
instance.query("GRANT DROP FUNCTION ON *.* TO B")
instance.query("DROP FUNCTION MySum", user = 'B')
assert "Unknown function MySum" in instance.query("SELECT MySum(1, 2)")
assert "Unknown function MySum" in instance.query_and_get_error("SELECT MySum(1, 2)")
instance.query("REVOKE CREATE FUNCTION ON default FROM A")
assert "it's necessary to have grant CREATE FUNCTION ON *.*" in instance.query_and_get_error(create_function_query, user = 'A')

View File

@ -25,8 +25,7 @@ def test_persistence():
assert instance.query("SELECT MySum1(1,2)") == "3\n"
assert instance.query("SELECT MySum2(1,2)") == "5\n"
cluster.shutdown()
cluster.start()
instance.restart_clickhouse()
assert instance.query("SELECT MySum1(1,2)") == "3\n"
assert instance.query("SELECT MySum2(1,2)") == "5\n"
@ -34,8 +33,7 @@ def test_persistence():
instance.query("DROP FUNCTION MySum2")
instance.query("DROP FUNCTION MySum1")
cluster.shutdown()
cluster.start()
instance.restart_clickhouse()
assert "Unknown function MySum1" in instance.query_and_get_error("SELECT MySum1(1, 2)")
assert "Unknown function MySum2" in instance.query_and_get_error("SELECT MySum2(1, 2)")