2020-07-01 02:28:31 +00:00
|
|
|
import os
|
2020-04-30 13:14:32 +00:00
|
|
|
|
2022-10-04 07:52:12 +00:00
|
|
|
import yaml
|
2021-05-07 12:14:37 +00:00
|
|
|
|
2021-10-07 11:28:31 +00:00
|
|
|
CONTAINER_WAIT_INTERVAL = "1m"
|
|
|
|
|
2022-12-07 12:38:56 +00:00
|
|
|
SIMPLE_OBJECT_SIZE = os.getenv("SIMPLE_OBJECT_SIZE", "1000")
|
|
|
|
COMPLEX_OBJECT_CHUNKS_COUNT = os.getenv("COMPLEX_OBJECT_CHUNKS_COUNT", "3")
|
|
|
|
COMPLEX_OBJECT_TAIL_SIZE = os.getenv("COMPLEX_OBJECT_TAIL_SIZE", "1000")
|
2021-05-07 12:14:37 +00:00
|
|
|
|
2022-09-28 12:07:16 +00:00
|
|
|
MAINNET_BLOCK_TIME = os.getenv("MAINNET_BLOCK_TIME", "1s")
|
|
|
|
MAINNET_TIMEOUT = os.getenv("MAINNET_TIMEOUT", "1min")
|
|
|
|
MORPH_BLOCK_TIME = os.getenv("MORPH_BLOCK_TIME", "1s")
|
2021-04-20 13:11:27 +00:00
|
|
|
NEOFS_CONTRACT_CACHE_TIMEOUT = os.getenv("NEOFS_CONTRACT_CACHE_TIMEOUT", "30s")
|
2021-11-08 09:57:19 +00:00
|
|
|
|
2022-08-15 15:21:23 +00:00
|
|
|
# Time interval that allows a GC pass on storage node (this includes GC sleep interval
|
|
|
|
# of 1min plus 15 seconds for GC pass itself)
|
|
|
|
STORAGE_GC_TIME = os.getenv("STORAGE_GC_TIME", "75s")
|
2021-05-07 12:14:37 +00:00
|
|
|
|
2022-10-04 07:52:12 +00:00
|
|
|
GAS_HASH = os.getenv("GAS_HASH", "0xd2a4cff31913016155e38e474a2c06d08be276cf")
|
2021-04-20 09:51:53 +00:00
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
NEOFS_CONTRACT = os.getenv("NEOFS_IR_CONTRACTS_NEOFS")
|
2021-04-25 10:43:39 +00:00
|
|
|
|
2022-08-25 10:57:55 +00:00
|
|
|
ASSETS_DIR = os.getenv("ASSETS_DIR", "TemporaryDir")
|
2022-10-04 07:52:12 +00:00
|
|
|
DEVENV_PATH = os.getenv("DEVENV_PATH", os.path.join("..", "neofs-dev-env"))
|
2021-06-25 13:44:42 +00:00
|
|
|
|
2022-10-04 07:52:12 +00:00
|
|
|
# Password of wallet owned by user on behalf of whom we are running tests
|
|
|
|
WALLET_PASS = os.getenv("WALLET_PASS", "")
|
|
|
|
|
2022-10-18 22:01:42 +00:00
|
|
|
# Load node parameters
|
2022-10-28 00:09:24 +00:00
|
|
|
LOAD_NODES = os.getenv("LOAD_NODES", "").split(",")
|
2022-11-28 19:27:37 +00:00
|
|
|
LOAD_NODE_SSH_USER = os.getenv("LOAD_NODE_SSH_USER", "root")
|
2022-10-18 22:01:42 +00:00
|
|
|
LOAD_NODE_SSH_PRIVATE_KEY_PATH = os.getenv("LOAD_NODE_SSH_PRIVATE_KEY_PATH")
|
2022-11-28 19:27:37 +00:00
|
|
|
BACKGROUND_WRITERS_COUNT = os.getenv("BACKGROUND_WRITERS_COUNT", 10)
|
|
|
|
BACKGROUND_READERS_COUNT = os.getenv("BACKGROUND_READERS_COUNT", 10)
|
|
|
|
BACKGROUND_OBJ_SIZE = os.getenv("BACKGROUND_OBJ_SIZE", 1024)
|
|
|
|
BACKGROUND_LOAD_MAX_TIME = os.getenv("BACKGROUND_LOAD_MAX_TIME", 600)
|
2022-10-18 22:01:42 +00:00
|
|
|
|
2022-10-09 20:01:59 +00:00
|
|
|
# Paths to CLI executables on machine that runs tests
|
2022-09-28 12:07:16 +00:00
|
|
|
NEOGO_EXECUTABLE = os.getenv("NEOGO_EXECUTABLE", "neo-go")
|
|
|
|
NEOFS_CLI_EXEC = os.getenv("NEOFS_CLI_EXEC", "neofs-cli")
|
2022-10-04 07:52:12 +00:00
|
|
|
NEOFS_AUTHMATE_EXEC = os.getenv("NEOFS_AUTHMATE_EXEC", "neofs-authmate")
|
|
|
|
NEOFS_ADM_EXEC = os.getenv("NEOFS_ADM_EXEC", "neofs-adm")
|
2022-07-13 14:30:57 +00:00
|
|
|
|
2022-10-04 07:52:12 +00:00
|
|
|
# Config for neofs-adm utility. Optional if tests are running against devenv
|
2022-07-13 14:30:57 +00:00
|
|
|
NEOFS_ADM_CONFIG_PATH = os.getenv("NEOFS_ADM_CONFIG_PATH")
|
2022-07-05 10:17:36 +00:00
|
|
|
|
2022-07-14 07:33:45 +00:00
|
|
|
FREE_STORAGE = os.getenv("FREE_STORAGE", "false").lower() == "true"
|
2022-08-08 14:49:08 +00:00
|
|
|
BIN_VERSIONS_FILE = os.getenv("BIN_VERSIONS_FILE")
|
2022-10-04 07:52:12 +00:00
|
|
|
|
2022-10-09 20:01:59 +00:00
|
|
|
HOSTING_CONFIG_FILE = os.getenv("HOSTING_CONFIG_FILE", ".devenv.hosting.yaml")
|
2022-10-18 22:01:42 +00:00
|
|
|
STORAGE_NODE_SERVICE_NAME_REGEX = r"s\d\d"
|
2022-10-28 00:09:24 +00:00
|
|
|
HTTP_GATE_SERVICE_NAME_REGEX = r"http-gate\d\d"
|
|
|
|
S3_GATE_SERVICE_NAME_REGEX = r"s3-gate\d\d"
|
2022-10-09 20:01:59 +00:00
|
|
|
|
2022-10-04 07:52:12 +00:00
|
|
|
# Generate wallet configs
|
|
|
|
# TODO: we should move all info about wallet configs to fixtures
|
|
|
|
WALLET_CONFIG = os.path.join(os.getcwd(), "wallet_config.yml")
|
|
|
|
with open(WALLET_CONFIG, "w") as file:
|
|
|
|
yaml.dump({"password": WALLET_PASS}, file)
|