From 4941d3d4b1ba10ccddf5429463debcefac6fbd9f Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Nov 18 2020 17:40:32 +0000 Subject: ipatests: Test that ipa-certupdate can run without credentials https://pagure.io/freeipa/issue/8531 Signed-off-by: Rob Crittenden Reviewed-By: Fraser Tweedale --- diff --git a/ipatests/test_integration/test_commands.py b/ipatests/test_integration/test_commands.py index e6f0fe3..27e67a0 100644 --- a/ipatests/test_integration/test_commands.py +++ b/ipatests/test_integration/test_commands.py @@ -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"])