Sonar job is broken 62/9262/1
authorsahil-xoriant <sahil.koli@xoriant.com>
Fri, 14 Oct 2022 07:53:14 +0000 (13:23 +0530)
committersahil-xoriant <sahil.koli@xoriant.com>
Fri, 14 Oct 2022 07:53:14 +0000 (13:23 +0530)
SMO-100

Signed-off-by: sahil-xoriant <sahil.koli@xoriant.com>
Change-Id: I5fd9df0bf5bfe7fe4cb543bbe0dae0675eb69334

tests/collector/test_monitor.py
tests/dmaap_adaptor/test_consumer.py

index 46653e2..d2ab598 100644 (file)
@@ -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
 
 
index 55a29c9..8395fc4 100644 (file)
@@ -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