From 8e1d5244568bb409a2898b4c310392256380553d Mon Sep 17 00:00:00 2001 From: Sergey Orlov Date: Apr 01 2020 09:34:09 +0000 Subject: 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 --- diff --git a/ipatests/test_integration/test_idviews.py b/ipatests/test_integration/test_idviews.py index 0869517..f063d4b 100644 --- a/ipatests/test_integration/test_idviews.py +++ b/ipatests/test_integration/test_idviews.py @@ -84,10 +84,16 @@ class TestCertsInIDOverrides(IntegrationTest): cls.reqdir, stdin=stdin_text) # Export the previously generated cert - tasks.run_certutil(master, ['-L', '-n', cls.adcert1, '-a', '>', - cls.adcert1_file], cls.reqdir) - tasks.run_certutil(master, ['-L', '-n', cls.adcert2, '-a', '>', - cls.adcert2_file], cls.reqdir) + res = tasks.run_certutil(master, ['-L', '-n', cls.adcert1, '-a'], + cls.reqdir) + master.put_file_contents( + 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( "openssl x509 -outform der -in %s | base64 -w 0" % cls.adcert1_file ).stdout_text