aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
blob: aaae72a0f76820d9035e481208dc83bcc45f748b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import docker

class PrhLibrary(object):

    def __init__(self):
        pass

    def check_for_log(self, search_for):
        client = docker.from_env()
        container = client.containers.get('prh')
        for line in container.logs(stream=True):
            if search_for in line.strip():
                return True
        else:
            return False