Skip to content

Commit

Permalink
Remove some from harness
Browse files Browse the repository at this point in the history
  • Loading branch information
maximyurchuk committed Oct 28, 2024
1 parent 1093d22 commit 0a5b866
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
5 changes: 0 additions & 5 deletions ydb/tests/library/harness/param_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@ def _get_param(name, default):
return default


config_name = _get_param("kikimr.ci.cluster_name", None)
ssh_username = _get_param("kikimr.ci.ssh_username", os.getenv('NEMESIS_USER', 'robot-nemesis'))
deploy_cluster = _get_param("kikimr.ci.deploy_cluster", "false") == "true"
use_packages = _get_param('kikimr.ci.packages', "false") == "true"

log_level = int(_get_param('kikimr.ci.driver.log_level', 5))

kikimr_binary_deploy_path = '/Berkanavt/kikimr/bin/kikimr'
kikimr_configure_binary_deploy_path = '/Berkanavt/kikimr/bin/kikimr_configure'
kikimr_configuration_deploy_path = '/Berkanavt/kikimr/cfg'
kikimr_cluster_yaml_deploy_path = '/Berkanavt/kikimr/cfg/cluster.yaml'
blockstore_configs_deploy_path = '/Berkanavt/nbs-server/cfg'
kikimr_next_version_deploy_path = '/Berkanavt/kikimr/bin/kikimr_next'
kikimr_last_version_deploy_path = '/Berkanavt/kikimr/bin/kikimr_last'
kikimr_home = '/Berkanavt/kikimr'
Expand Down
26 changes: 9 additions & 17 deletions ydb/tests/stability/ydb/test_stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,19 @@
logger = logging.getLogger(__name__)


class ImmutableProperty(object):
def __init__(self, value):
super(ImmutableProperty, self).__init__()
self.__value = value

def __get__(self, instance, owner):
return self.__value

def __set__(self, instance, value):
raise AttributeError('Attribute is immutable')


def read_table_profile():
with open(yatest.common.source_path('ydb/tests/stability/resources/tbl_profile.txt'), 'r') as reader:
return reader.read()


def get_slice_directory(slice_name):
def get_slice_directory():
return os.getenv('YDB_CLUSTER_YAML_PATH')


def get_slice_name():
return yatest.common.get_param("kikimr.ci.cluster_name", None)


class TestSetupForStability(object):
stress_binaries_deploy_path = '/Berkanavt/nemesis/bin/'
artifacts = (
Expand All @@ -52,11 +44,11 @@ class TestSetupForStability(object):

@classmethod
def setup_class(cls):
cls.slice_name = ImmutableProperty(param_constants.config_name)
cls.slice_name = get_slice_name()
assert cls.slice_name is not None

logger.info('setup_class started for slice = {}'.format(cls.slice_name))
cls.kikimr_cluster = kikimr_cluster_factory(config_path=get_slice_directory(cls.slice_name))
cls.kikimr_cluster = kikimr_cluster_factory(config_path=get_slice_directory())
cls._stop_nemesis()
cls.kikimr_cluster.start()

Expand Down Expand Up @@ -170,10 +162,10 @@ def _stop_nemesis(cls):

class TestCheckLivenessAndSafety(object):
def test_liveness_and_safety(self):
slice_name = param_constants.config_name
slice_name = get_slice_name()
logger.info('slice = {}'.format(slice_name))
assert slice_name is not None
kikimr_cluster = kikimr_cluster_factory(config_path=get_slice_directory(slice_name))
kikimr_cluster = kikimr_cluster_factory(config_path=get_slice_directory())
composite_assert = CompositeAssert()
composite_assert.assert_that(
safety_warden_factory(kikimr_cluster).list_of_safety_violations(),
Expand Down

0 comments on commit 0a5b866

Please sign in to comment.