mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
ipatests: Fix a call to run_command with wildcard
The test is calling run_command with a list of arguments: run_command(['rm', '-f', paths.CERTMONGER_REQUESTS_DIR + '/*']) but this format does not support shell expansion. Replace with a str parameter: run_command('rm -fv' + paths.CERTMONGER_REQUESTS_DIR + '/*') to make sure all the files in the directory are actually removed. Fixes: https://pagure.io/freeipa/issue/8506 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
52ec9cc027
commit
e32bfd44ee
@ -122,9 +122,10 @@ def expire_cert_critical():
|
||||
# errors from certmonger trying to check the status of certs
|
||||
# that don't matter because we are uninstalling.
|
||||
host.run_command(['systemctl', 'stop', 'certmonger'])
|
||||
host.run_command(
|
||||
['rm', '-f', paths.CERTMONGER_REQUESTS_DIR + '/*']
|
||||
)
|
||||
# Important: run_command with a str argument is able to
|
||||
# perform shell expansion but run_command with a list of
|
||||
# arguments is not
|
||||
host.run_command('rm -fv ' + paths.CERTMONGER_REQUESTS_DIR + '*')
|
||||
tasks.uninstall_master(host)
|
||||
tasks.move_date(host, 'start', '-3Years-1day')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user