diff options
Diffstat (limited to 'test/csit/tests/dcaegen2/prh_testcases/resources')
-rw-r--r-- | test/csit/tests/dcaegen2/prh_testcases/resources/PrhLibrary.py | 7 | ||||
-rw-r--r-- | test/csit/tests/dcaegen2/prh_testcases/resources/simulator/AAI.py | 7 |
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): |