aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
diff options
context:
space:
mode:
authorAndrewLamb <andrew.a.lamb@est.tech>2023-02-24 14:40:59 +0000
committerAndrewLamb <andrew.a.lamb@est.tech>2023-02-24 14:41:12 +0000
commitf862683a7e4363cde071458e399e28dd4afea33e (patch)
treefa3a3f3c4c4930408e2678f6ac3a94a8a5966d0d /tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
parentfa6e42f8dc0f50342bcf000d540943e85dec3a60 (diff)
Dcaegen2 Jenkins jobs are failing
Issue-ID: INT-2199 Change-Id: I33552abd3c18570225a14cbc86adeeb9909511b6 Signed-off-by: AndrewLamb <andrew.a.lamb@est.tech>
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources/PrhLibrary.py')
-rw-r--r--tests/dcaegen2/prh-testcases/resources/PrhLibrary.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
index d1992283..d2b5e166 100644
--- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
+++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
@@ -35,7 +35,7 @@ class PrhLibrary(object):
for line in container.logs(stream=True, since=self.test_start_time):
print(line)
for searched_entry in searched_entries:
- if searched_entry in line.strip():
+ if searched_entry in line.decode(encoding='utf-8').strip():
return True
else:
return False
@@ -173,14 +173,14 @@ class PrhLibrary(object):
def __extract_json(line, pattern):
full_message = PrhLibrary.__extract_full_message_from_line(line)
if full_message is not None:
- match = pattern.match(full_message)
+ match = pattern.match(full_message.decode(encoding='utf-8'))
if match:
return match.group(1).replace("\\n", "\n").replace("\\t", "\t")
return None
@staticmethod
def __extract_full_message_from_line(line):
- split = line.split("|")
+ split = line.split(bytes('|', 'utf-8'))
if len(split) > 3:
return split[3]
return None