forked from TrueCloudLab/frostfs-testlib
Move shared code to testlib
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
d97a02d1d3
commit
997e768e92
69 changed files with 9213 additions and 64 deletions
26
src/frostfs_testlib/resources/optionals.py
Normal file
26
src/frostfs_testlib/resources/optionals.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import os
|
||||
|
||||
|
||||
def str_to_bool(input: str) -> bool:
|
||||
return input in ["true", "True", "1"]
|
||||
|
||||
|
||||
# Override these optional params to not comment/modify code during local development. Use with caution.
|
||||
# Node under test. Set this to occupy exact node.
|
||||
OPTIONAL_NODE_UNDER_TEST = os.getenv("OPTIONAL_NODE_UNDER_TEST")
|
||||
|
||||
# Node under load. Set this to target load on exact node.
|
||||
OPTIONAL_NODE_UNDER_LOAD = os.getenv("OPTIONAL_NODE_UNDER_LOAD")
|
||||
|
||||
# Set this to True to disable failover commands. I.E. node which supposed to be stopped will not be actually stopped.
|
||||
OPTIONAL_FAILOVER_ENABLED = str_to_bool(os.getenv("OPTIONAL_FAILOVER_ENABLED", "true"))
|
||||
|
||||
# Set this to True to disable background load. I.E. node which supposed to be stopped will not be actually stopped.
|
||||
OPTIONAL_BACKGROUND_LOAD_ENABLED = str_to_bool(
|
||||
os.getenv("OPTIONAL_BACKGROUND_LOAD_ENABLED", "true")
|
||||
)
|
||||
|
||||
# Set this to False for disable autouse fixture like node healthcheck during developing time.
|
||||
OPTIONAL_AUTOUSE_FIXTURES_ENABLED = str_to_bool(
|
||||
os.getenv("OPTIONAL_AUTOUSE_FIXTURES_ENABLED", "true")
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue