mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: explicitly save output of certutil
The test setup was failing because output redirection does not work in run_command() when specifued as list element. Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
@@ -84,10 +84,16 @@ class TestCertsInIDOverrides(IntegrationTest):
|
|||||||
cls.reqdir, stdin=stdin_text)
|
cls.reqdir, stdin=stdin_text)
|
||||||
|
|
||||||
# Export the previously generated cert
|
# Export the previously generated cert
|
||||||
tasks.run_certutil(master, ['-L', '-n', cls.adcert1, '-a', '>',
|
res = tasks.run_certutil(master, ['-L', '-n', cls.adcert1, '-a'],
|
||||||
cls.adcert1_file], cls.reqdir)
|
cls.reqdir)
|
||||||
tasks.run_certutil(master, ['-L', '-n', cls.adcert2, '-a', '>',
|
master.put_file_contents(
|
||||||
cls.adcert2_file], cls.reqdir)
|
os.path.join(master.config.test_dir, cls.adcert1_file),
|
||||||
|
res.stdout_text)
|
||||||
|
res = tasks.run_certutil(master, ['-L', '-n', cls.adcert2, '-a'],
|
||||||
|
cls.reqdir)
|
||||||
|
master.put_file_contents(
|
||||||
|
os.path.join(master.config.test_dir, cls.adcert2_file),
|
||||||
|
res.stdout_text)
|
||||||
cls.cert1_base64 = cls.master.run_command(
|
cls.cert1_base64 = cls.master.run_command(
|
||||||
"openssl x509 -outform der -in %s | base64 -w 0" % cls.adcert1_file
|
"openssl x509 -outform der -in %s | base64 -w 0" % cls.adcert1_file
|
||||||
).stdout_text
|
).stdout_text
|
||||||
|
|||||||
Reference in New Issue
Block a user