summaryrefslogtreecommitdiffstats
path: root/csit/tests/filesprocessingconfigpmmapper/libraries
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2022-01-31 13:03:27 +0100
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>2022-02-11 08:57:40 +0100
commit4ec32437bf1a19bcd55e0dc24c97614a764c8aae (patch)
tree3eb530ed8b6cfc2dc4c23cebdc52197397396134 /csit/tests/filesprocessingconfigpmmapper/libraries
parent25f7419b16e1fc090d65465f2fa1c72662c872bf (diff)
Remove Consul from CSITs
Issue-ID: DCAEGEN2-2964 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com> Change-Id: I0f21178e938b4e6ad13b9601fdd9cca93e06621c
Diffstat (limited to 'csit/tests/filesprocessingconfigpmmapper/libraries')
-rw-r--r--csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.py5
-rw-r--r--csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py23
2 files changed, 23 insertions, 5 deletions
diff --git a/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.py b/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.py
index 036a8a1..e3186ca 100644
--- a/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.py
+++ b/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.py
@@ -28,8 +28,7 @@ class DockerContainerManager:
environment = EnvsReader().read_env_list_from_file(path_to_env)
environment.append("CONFIG_BINDING_SERVICE_SERVICE_PORT=10000")
environment.append("CONFIG_BINDING_SERVICE=172.18.0.5")
- environment.append("CONSUL_HOST=172.18.0.5")
- environment.append("HOSTNAME=pmmapper")
+ environment.append("CBS_CLIENT_CONFIG_PATH=/app-config-input/application_config.yaml")
client.containers.run(
image=client_image,
name=container_name,
@@ -38,7 +37,7 @@ class DockerContainerManager:
network='filesprocessingconfigpmmapper_pmmapper-network',
extra_hosts={'dmaap-dr-node': dr_node_ip, 'message-router': mr_ip},
user='root',
- mounts=[Mount(target='/opt/app/pm-mapper/etc/certs/', source='/var/tmp/', type='bind')],
+ mounts=[Mount(target='/opt/app/pm-mapper/etc/certs/', source='/var/tmp/', type='bind'), Mount(target='/app-config-input/application_config.yaml', source='/var/tmp/config.yaml', type='bind')],
detach=True
)
diff --git a/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py b/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
index 01718e3..cc4bf22 100644
--- a/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
+++ b/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
@@ -1,3 +1,22 @@
+# ============LICENSE_START=======================================================
+# org.onap.dcae
+# ================================================================================
+# Copyright (c) 2021-2022 Nokia. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+
import re
class LogReader:
@@ -14,8 +33,8 @@ class LogReader:
nrs_set.add(filename[0])
return ret_logs
- def get_number_of_dropped_messages(self, logs_output):
- return len(list(filter(lambda line: "|429|" in line, logs_output)))
+ def get_number_of_element_occurrences_in_logs(self, logs_output, element):
+ return len(list(filter(lambda line: element in line, logs_output)))
def get_log_files_list(self, fileNames):
files = fileNames.split()