From ad176943a04a2bd9136dc5f4933ffbd038db69aa Mon Sep 17 00:00:00 2001 From: sahil-xoriant Date: Fri, 14 Oct 2022 13:23:14 +0530 Subject: [PATCH] Sonar job is broken SMO-100 Signed-off-by: sahil-xoriant Change-Id: I5fd9df0bf5bfe7fe4cb543bbe0dae0675eb69334 --- tests/collector/test_monitor.py | 6 ++++-- tests/dmaap_adaptor/test_consumer.py | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/collector/test_monitor.py b/tests/collector/test_monitor.py index 46653e2..d2ab598 100644 --- a/tests/collector/test_monitor.py +++ b/tests/collector/test_monitor.py @@ -432,8 +432,10 @@ def test_TestControl_listener_schema_validation_error(mocker,mock_input,body,sta @pytest.fixture def schema_wrong(): - schema_path ="/home/ves-dev/ves/tests/collector/schema.json" - schema=json.load(open(schema_path, 'r')) + project_path = get_path() + schema_path = os.path.join( + project_path, "tests/collector/schema.json") + schema = json.load(open(schema_path, 'r')) return schema diff --git a/tests/dmaap_adaptor/test_consumer.py b/tests/dmaap_adaptor/test_consumer.py index 55a29c9..8395fc4 100644 --- a/tests/dmaap_adaptor/test_consumer.py +++ b/tests/dmaap_adaptor/test_consumer.py @@ -55,13 +55,12 @@ def resCode(): def get_path(): project_path = os.getcwd() - project_path = project_path[:project_path.rfind('/')] return project_path def get_config_path(): project_path=get_path() config_path = os.path.join( - project_path,"ves/dmaapadapter/adapter/config/adapter.conf") + project_path,"dmaapadapter/adapter/config/adapter.conf") return config_path #test __init__ of EventConsumer -- 2.16.6