Automatic style fix

This commit is contained in:
robot-clickhouse 2024-11-29 17:53:59 +00:00
parent b512997e50
commit fad3f2ff00

View File

@ -1,7 +1,7 @@
from enum import Enum
import random import random
import string import string
import time import time
from enum import Enum
import pytest import pytest
@ -10,18 +10,12 @@ from helpers.cluster import ClickHouseCluster
cluster = ClickHouseCluster(__file__) cluster = ClickHouseCluster(__file__)
good = cluster.add_instance( good = cluster.add_instance(
"good", "good",
main_configs=[ main_configs=["config/users.xml", "config/good_script.xml"],
"config/users.xml",
"config/good_script.xml"
],
stay_alive=True, stay_alive=True,
) )
bad = cluster.add_instance( bad = cluster.add_instance(
"bad", "bad",
main_configs=[ main_configs=["config/users.xml", "config/bad_script.xml"],
"config/users.xml",
"config/bad_script.xml"
],
stay_alive=True, stay_alive=True,
) )
@ -43,14 +37,20 @@ def test_startup_execution_state(start_cluster):
STATE_SUCCESS = 1 STATE_SUCCESS = 1
STATE_FAILURE = 2 STATE_FAILURE = 2
assert int( assert (
good.query( int(
"SELECT value FROM system.metrics WHERE metric = 'StartupScriptsExecutionState'" good.query(
).strip() "SELECT value FROM system.metrics WHERE metric = 'StartupScriptsExecutionState'"
) == STATE_SUCCESS ).strip()
)
== STATE_SUCCESS
)
assert int( assert (
bad.query( int(
"SELECT value FROM system.metrics WHERE metric = 'StartupScriptsExecutionState'" bad.query(
).strip() "SELECT value FROM system.metrics WHERE metric = 'StartupScriptsExecutionState'"
) == STATE_FAILURE ).strip()
)
== STATE_FAILURE
)