diff options
author | Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> | 2020-08-17 11:30:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-17 11:30:32 +0000 |
commit | 3a52015d20454d68dced8aef5a65a8377d2cac4a (patch) | |
tree | 40298f11cd030f29f0bc24540b16a04e5dbf5c81 /tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py | |
parent | 91b48eabca14c8f36dbe882600926325929f9c48 (diff) | |
parent | 131d4dda822b637e816ef225d8a4c9981ccf56a7 (diff) |
Merge "Refactor DMaaP simulator and add tests."
Diffstat (limited to 'tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py')
-rw-r--r-- | tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py new file mode 100644 index 00000000..b8189422 --- /dev/null +++ b/tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py @@ -0,0 +1,42 @@ + +import os +import subprocess +import time + +from robot.api import logger + + +class CertsLibrary(object): + + def __init__(self): + pass + + + + @staticmethod + def generate_certs(): + ws = os.environ['WORKSPACE'] + script2run = ws + "/tests/dcaegen2/testcases/resources/gen-certs.sh" + logger.info("Running script: " + script2run) + logger.console("Running script: " + script2run) + subprocess.call([script2run, ws]) + time.sleep(5) + return + + @staticmethod + def remove_certs(): + ws = os.environ['WORKSPACE'] + script2run = ws + "/tests/dcaegen2/testcases/resources/rm-certs.sh" + logger.info("Running script: " + script2run) + logger.console("Running script: " + script2run) + subprocess.call([script2run, ws]) + time.sleep(5) + return + + + + + + + + |