forked from mirrors/thatmattlove-hyperglass
fixed incorrect path issue
This commit is contained in:
parent
2879bb1ca7
commit
39ca6f3930
1 changed files with 4 additions and 2 deletions
|
|
@ -7,15 +7,18 @@ import requests
|
|||
from logzero import logger
|
||||
|
||||
working_directory = os.path.dirname(os.path.abspath(__file__))
|
||||
parent_directory = os.path.dirname(working_directory)
|
||||
|
||||
|
||||
def ci_config():
|
||||
"""Copies test configuration files to usable config files"""
|
||||
logger.info("Migrating test config files...")
|
||||
config_dir = os.path.join(working_directory, "hyperglass/configuration/")
|
||||
config_dir = os.path.join(parent_directory, "hyperglass/configuration/")
|
||||
test_files = glob.iglob(os.path.join(working_directory, "*.toml"))
|
||||
config_files = glob.iglob(os.path.join(config_dir, "*.toml"))
|
||||
logger.debug(config_dir)
|
||||
logger.debug(working_directory)
|
||||
logger.debug(parent_directory)
|
||||
status = False
|
||||
for f in config_files:
|
||||
if os.path.exists(f):
|
||||
|
|
@ -188,7 +191,6 @@ def ci_test(
|
|||
def flask_dev_server(host, port):
|
||||
"""Starts Flask development server for testing without WSGI/Reverse Proxy"""
|
||||
try:
|
||||
parent_directory = os.path.dirname(working_directory)
|
||||
sys.path.insert(0, parent_directory)
|
||||
|
||||
from hyperglass import hyperglass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue