ipatests: Test that ipa-certupdate can run without credentials

https://pagure.io/freeipa/issue/8531

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
Rob Crittenden 2020-11-10 15:27:16 -05:00 committed by Alexander Bokovoy
parent d9b259dd58
commit d30939ebfd

View File

@ -1356,3 +1356,23 @@ class TestIPACommand(IntegrationTest):
self.master, user,
'{0}\n{1}\n{1}\n'.format(original_passwd, new_passwd)
)
def test_certupdate_no_schema(self):
"""Test that certupdate without existing API schema.
With no existing credentials the API schema download
would cause the whole command to fail.
"""
tasks.kdestroy_all(self.master)
self.master.run_command(
["rm", "-rf",
"/root/.cache/ipa/servers",
"/root/.cache/ipa/schema"]
)
# It first has to retrieve schema then can run
self.master.run_command(["ipa-certupdate"])
# Run it again for good measure
self.master.run_command(["ipa-certupdate"])