github.com/platonnetwork/platon-go@v0.7.6/cases/environment/config.py (about) 1 from common.abspath import abspath 2 from conf import settings as conf 3 from conf.settings import ConfTmpDir 4 5 6 class TestConfig: 7 def __init__(self, conf_tmp: ConfTmpDir, install_supervisor=True, install_dependency=True, init_chain=True, is_need_static=True, can_deploy=True): 8 self.can_deploy = can_deploy 9 # local must file 10 self.platon_bin_file = conf.PLATON_BIN_FILE 11 self.genesis_file = conf.GENESIS_FILE 12 self.supervisor_file = conf.SUPERVISOR_FILE 13 self.node_file = conf.NODE_FILE 14 self.address_file = conf.ADDRESS_FILE 15 self.account_file = conf.ACCOUNT_FILE 16 self.config_json_file = conf.CONFIG_JSON_FILE 17 # local cache directory 18 self.root_tmp = conf_tmp.tmp_root_path 19 self.node_tmp = conf_tmp.LOCAL_TMP_FILE_FOR_NODE 20 self.server_tmp = conf_tmp.LOCAL_TMP_FILE_FOR_SERVER 21 self.env_tmp = conf_tmp.LOCAL_TMP_FILE_FOR_ENV 22 self.genesis_tmp = conf_tmp.GENESIS_FILE 23 self.static_node_tmp = conf_tmp.STATIC_NODE_FILE 24 self.config_json_tmp = conf_tmp.CONFIG_JSON_FILE 25 26 # server dependent installation 27 self.install_supervisor = install_supervisor 28 self.install_dependency = install_dependency 29 30 # chain deployment customization 31 self.init_chain = init_chain 32 self.is_need_static = is_need_static 33 self.log_level = 5 34 self.syncmode = "full" 35 self.append_cmd = "" 36 37 # maximum number of threads 38 self.max_worker = 30 39 40 # environment id 41 self.env_id = None 42 43 # server remote directory 44 self.deploy_path = conf.DEPLOY_PATH 45 self.remote_supervisor_tmp = "{}/tmp/supervisor_{}/".format(self.deploy_path, conf_tmp.dir) 46 self.remote_compression_tmp_path = "{}/tmp/env_{}/".format(self.deploy_path, conf_tmp.dir) 47 48 # log related 49 self.bug_log = abspath("./bug_log") 50 self.tmp_log = abspath("./tmp_log") 51