From: sahil-xoriant Date: Fri, 14 Oct 2022 07:53:14 +0000 (+0530) Subject: Sonar job is broken X-Git-Tag: 6.0.2~1 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=ad176943a04a2bd9136dc5f4933ffbd038db69aa;p=smo%2Fves.git Sonar job is broken SMO-100 Signed-off-by: sahil-xoriant Change-Id: I5fd9df0bf5bfe7fe4cb543bbe0dae0675eb69334 --- 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