Skip to content
Snippets Groups Projects
Commit 85bd355e authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-780: change unittest path

parent a653f4e8
No related branches found
No related tags found
1 merge request!393Resolve L2SS-780 "Prometheus exporter test"
......@@ -8,18 +8,19 @@
# See LICENSE.txt for more info.
from tangostationcontrol.test import base
import sys
import sys, os
import importlib.util
module_name = 'ArchiverPolicy'
file_path = '/opt/lofar/tango/docker-compose/tango-prometheus-exporter/code/tango-prometheus-client.py'
spec = importlib.util.spec_from_file_location(module_name, file_path)
home_path = os.path.expanduser('~')
file_path = 'docker-compose/tango-prometheus-exporter/code/tango-prometheus-client.py'
spec = importlib.util.spec_from_file_location(module_name, os.path.join(home_path,file_path))
tpc = importlib.util.module_from_spec(spec)
sys.modules[module_name] = tpc
spec.loader.exec_module(tpc)
class TestArchiverPolicy(base.TestCase):
CONFIG = tpc.ArchiverPolicy.load_config('/opt/lofar/tango/docker-compose/tango-prometheus-exporter/lofar2-policy.json')
tpc.ArchiverPolicy.load_config(os.path.join(home_path, 'docker-compose/tango-prometheus-exporter/lofar2-policy.json'))
def test_config_file(self):
""" Test if policy config file is correctly retrieved """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment