Commit 754bee0682d55e4ea5ea99c4fbe7e4ea8b314af1

Authored by Alexis Koralewski
1 parent cd7e73d5
Exists in dev

fixing test issue for monitoring (couldn't create config file because the workin…

…g directory wasn't monitoring but pyros_django)
Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
src/core/pyros_django/monitoring/plc_checker.py
... ... @@ -147,6 +147,9 @@ class PlcChecker(object):
147 147 #plc_config_dir = "./src/core/pyros_django/monitoring/"
148 148 # ok with ./pyros start agentM
149 149 plc_config_dir = Path("../monitoring/")
  150 + # When executing test, we're not in the monitoring folder
  151 + if("pyros_django" == os.getcwd().split("/")[-1]):
  152 + plc_config_dir = Path("./monitoring/")
150 153 _file = open(plc_config_dir/"plc_config.json" , 'w')
151 154 _file.write(json.dumps(_struct))
152 155 _file.close()
... ...