From 7931a26b95218c02eb7433f76a52e17c889e337f Mon Sep 17 00:00:00 2001 From: Oleg Fayans Date: Nov 14 2016 17:29:48 +0000 Subject: Added interface to certutil Added generic method to run certutil with arbitrary set of paramenters Reviewed-By: Lenka Doudova --- diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index ece9b7e..8c42ccf 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -1208,6 +1208,13 @@ def run_server_del(host, server_to_delete, force=False, return host.run_command(args, raiseonerr=False) +def run_certutil(host, args, reqdir, stdin=None, raiseonerr=True): + new_args = [paths.CERTUTIL, "-d", reqdir] + new_args = " ".join(new_args + args) + return host.run_command(new_args, raiseonerr=raiseonerr, + stdin_text=stdin) + + def assert_error(result, stderr_text, returncode=None): "Assert that `result` command failed and its stderr contains `stderr_text`" assert stderr_text in result.stderr_text, result.stderr_text