aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dcaegen2/prh_testcases/resources
diff options
context:
space:
mode:
authorMariusz Wagner <mariusz.wagner@nokia.com>2018-06-14 15:53:56 +0200
committerMariusz Wagner <mariusz.wagner@nokia.com>2018-06-14 15:53:56 +0200
commita2a6c98d4c8c14426c424cebf03668b58c270b60 (patch)
tree02b04a21573dcd4e12455c4701995eb6d6fed411 /test/csit/tests/dcaegen2/prh_testcases/resources
parentcfd26b9b18e5a6dbe023f983b233ce94c68bdd46 (diff)
Added TC - AAI have wrong record
Issue-ID: INT-531 Change-Id: I3f2db55f0257ee8d9e85c3e5678b71d8bf0ad147 Signed-off-by: Mariusz Wagner <mariusz.wagner@nokia.com>
Diffstat (limited to 'test/csit/tests/dcaegen2/prh_testcases/resources')
-rw-r--r--test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py7
-rw-r--r--test/csit/tests/dcaegen2/prh_testcases/resources/simulator/AAI.py7
2 files changed, 9 insertions, 5 deletions
diff --git a/test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py b/test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py
index 72f491efe..f07f385f5 100644
--- a/test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py
+++ b/test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py
@@ -5,11 +5,12 @@ class PrhLibrary(object):
def __init__(self):
pass
- def check_log_for_missing_IP(self):
+ def check_for_log(self, search_for):
client = docker.from_env()
container = client.containers.get('prh')
for line in container.logs(stream=True):
- if "org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException: IPV4 and IPV6 are empty" in line.strip():
+ if search_for in line.strip():
return True
else:
- return False \ No newline at end of file
+ return False
+ \ No newline at end of file
diff --git a/test/csit/tests/dcaegen2/prh_testcases/resources/simulator/AAI.py b/test/csit/tests/dcaegen2/prh_testcases/resources/simulator/AAI.py
index f9d0ee07b..2c0b42dcd 100644
--- a/test/csit/tests/dcaegen2/prh_testcases/resources/simulator/AAI.py
+++ b/test/csit/tests/dcaegen2/prh_testcases/resources/simulator/AAI.py
@@ -20,10 +20,13 @@ class AAIHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_PATCH(self):
pnfs_name = '/aai/v12/network/pnfs/pnf/' + pnfs
- if re.search(pnfs_name, self.path):
+ if re.search('wrong_aai_record', self.path):
+ self.send_response(400)
+ self.end_headers()
+ elif re.search(pnfs_name, self.path):
self.send_response(200)
self.end_headers()
-
+
return
def do_GET(self):