def get_envs(workspace, project): envs = [] env_json_path = os.path.join(workspace, 'projects', project, 'environments.json') if os.path.exists(env_json_path): env_data = utils.load_json_from_file(env_json_path) envs = list(env_data.keys()) return envs
def get_environment_data(workspace, project): env_data = {} env_json_path = os.path.join(workspace, 'projects', project, 'environments.json') if os.path.exists(env_json_path): env_data = utils.load_json_from_file(env_json_path) return env_data
def get_envs(workspace, project): envs = [] env_json_path = os.path.join(workspace, 'projects', project, 'environments.json') if os.path.exists(env_json_path): env_data = utils.load_json_from_file(env_json_path) envs = list(env_data.keys()) return envs
def get_secrets(project): secrets_data = {} secrets_json_path = os.path.join(session.testdir, 'projects', project, 'secrets.json') if os.path.exists(secrets_json_path): json_data = utils.load_json_from_file(secrets_json_path, ignore_failure=True, default={}) if json_data: secrets_data = json_data return secrets_data
def get_environment_data(workspace, project): """get the full env data defined in the environments.json file""" env_data = {} env_json_path = os.path.join(workspace, 'projects', project, 'environments.json') if os.path.exists(env_json_path): env_data = utils.load_json_from_file(env_json_path) return env_data
def get_environment_data(project): """get the full env data defined in the environments.json file""" env_data = {} env_path = environments_file_path(project) if os.path.isfile(env_path): json_data = utils.load_json_from_file(env_path, ignore_failure=True, default={}) if json_data: env_data = json_data return env_data
def get_environment_data(workspace, project): env_data = {} env_json_path = os.path.join(workspace, 'projects', project, 'environments.json') if os.path.exists(env_json_path): env_data = utils.load_json_from_file(env_json_path) return env_data
def read_json_file (filename): return load_json_from_file(filename)