github.com/platonnetwork/platon-go@v0.7.6/cases/conf/settings.py (about)

     1  import os
     2  
     3  # PlatON-Tests path
     4  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
     5  
     6  # server deployment node path
     7  DEPLOY_PATH = r"trantor_test"
     8  
     9  # script run log level
    10  RUN_LOG_LEVEL = "info"
    11  
    12  # local must file
    13  PLATON_BIN_FILE = os.path.abspath(os.path.join(BASE_DIR, "deploy/bin/platon"))
    14  GENESIS_FILE = os.path.abspath(os.path.join(BASE_DIR, "deploy/template/genesis_template.json"))
    15  CONFIG_JSON_FILE = os.path.abspath(os.path.join(BASE_DIR, "deploy/template/config_template.json"))
    16  STATIC_NODE_FILE = os.path.abspath(os.path.join(BASE_DIR, 'deploy/template/static-nodes.json'))
    17  SUPERVISOR_FILE = os.path.abspath(os.path.join(BASE_DIR, "deploy/template/supervisor_template.conf"))
    18  ADDRESS_FILE = os.path.abspath(
    19      os.path.join(BASE_DIR, 'deploy/template/UTC--2019-08-23T12-33-18.192329788Z--2e95e3ce0a54951eb9a99152a6d5827872dfb4fd'))
    20  ACCOUNT_FILE = os.path.abspath(os.path.join(BASE_DIR, "deploy/accounts.yml"))
    21  
    22  # cache file root directory
    23  LOCAL_TMP_FILE_ROOT_DIR = os.path.abspath(os.path.join(BASE_DIR, "deploy/tmp"))
    24  # LOCAL_TMP_FILE_FOR_NODE = os.path.abspath(os.path.join(LOCAL_TMP_FILE_ROOT_DIR, "node"))
    25  # LOCAL_TMP_FILE_FOR_SERVER = os.path.abspath(os.path.join(LOCAL_TMP_FILE_ROOT_DIR, "server"))
    26  # LOCAL_TMP_FILE_FOR_ENV = os.path.abspath(os.path.join(LOCAL_TMP_FILE_ROOT_DIR, "env"))
    27  # LOCAL_TMP_FILE_FOR_GNENESIS = os.path.abspath(os.path.join(LOCAL_TMP_FILE_ROOT_DIR, "genesis.json"))
    28  
    29  
    30  # cache directory configuration
    31  class ConfTmpDir:
    32      def __init__(self, dir):
    33          self.dir = dir
    34          self.tmp_root_path = os.path.abspath(os.path.join(LOCAL_TMP_FILE_ROOT_DIR, dir))
    35          if not os.path.exists(self.tmp_root_path):
    36              os.makedirs(self.tmp_root_path)
    37          self.GENESIS_FILE = os.path.abspath(os.path.join(self.tmp_root_path, "genesis.json"))
    38          self.CONFIG_JSON_FILE = os.path.abspath(os.path.join(self.tmp_root_path, "config.json"))
    39          self.STATIC_NODE_FILE = os.path.abspath(os.path.join(self.tmp_root_path, 'static-nodes.json'))
    40          self.LOCAL_TMP_FILE_FOR_NODE = os.path.abspath(os.path.join(self.tmp_root_path, 'node'))
    41          self.LOCAL_TMP_FILE_FOR_SERVER = os.path.abspath(os.path.join(self.tmp_root_path, 'server'))
    42          self.LOCAL_TMP_FILE_FOR_ENV = os.path.abspath(os.path.join(self.tmp_root_path, 'env'))
    43  
    44  
    45  # directory cache configuration
    46  DEFAULT_CONF_TMP_DIR = ConfTmpDir("global")
    47  
    48  NODE_FILE = os.path.abspath(os.path.join(BASE_DIR, "deploy/node/ppos_4_4_wyq1.yml"))