forked from TrueCloudLab/frostfs-testlib
Fix string representation for load params with empty fields
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
b856e82008
commit
612e088763
3 changed files with 43 additions and 8 deletions
|
@ -53,10 +53,6 @@ class BackgroundLoadController:
|
|||
if load_params.endpoint_selection_strategy is None:
|
||||
raise RuntimeError("endpoint_selection_strategy should not be None")
|
||||
|
||||
self.endpoints = self._get_endpoints(
|
||||
load_params.load_type, load_params.endpoint_selection_strategy
|
||||
)
|
||||
|
||||
@run_optionally(optionals.OPTIONAL_BACKGROUND_LOAD_ENABLED, [])
|
||||
def _get_endpoints(
|
||||
self, load_type: LoadType, endpoint_selection_strategy: EndpointSelectionStrategy
|
||||
|
@ -100,6 +96,9 @@ class BackgroundLoadController:
|
|||
@run_optionally(optionals.OPTIONAL_BACKGROUND_LOAD_ENABLED)
|
||||
@reporter.step_deco("Prepare load instances")
|
||||
def prepare(self):
|
||||
self.endpoints = self._get_endpoints(
|
||||
self.load_params.load_type, self.load_params.endpoint_selection_strategy
|
||||
)
|
||||
self.runner.prepare(self.load_params, self.nodes_under_load, self.k6_dir)
|
||||
self.runner.init_k6_instances(self.load_params, self.endpoints, self.k6_dir)
|
||||
|
||||
|
@ -204,3 +203,9 @@ class BackgroundLoadController:
|
|||
def _get_results(self) -> dict:
|
||||
with reporter.step(f"Get {self.load_params.scenario.value} scenario results"):
|
||||
return self.runner.get_results()
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.load_params.__str__()
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return repr(self.load_params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue