mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-13 06:25:00 -05:00
Change the return codes of ipa-acme-manage
Traditionally in IPA 0 = success, 1 = error and then specific error messages follow from that. Shift the ipa-acme-manage return codes for "not installed" and "not a CA" up by one. https://pagure.io/freeipa/issue/8498 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com> Reviewed-By: Mohammad Rizwan <myusuf@redhat.com>
This commit is contained in:
@@ -31,6 +31,8 @@ Display the status of the ACME service.
|
||||
.SH "EXIT STATUS"
|
||||
0 if the command was successful
|
||||
|
||||
1 if the host is not a CA server
|
||||
1 if an error occurred
|
||||
|
||||
2 if the host is not a FreeIPA server
|
||||
|
||||
3 if the host is not a CA server
|
||||
|
||||
@@ -104,7 +104,7 @@ class IPAACMEManage(AdminTool):
|
||||
|
||||
if not cainstance.is_ca_installed_locally():
|
||||
print("CA is not installed on this server.")
|
||||
return 1
|
||||
return 3
|
||||
|
||||
api.bootstrap(in_server=True, confdir=paths.ETC_IPA)
|
||||
api.finalize()
|
||||
|
||||
@@ -327,7 +327,7 @@ class TestACMECALess(IntegrationTest):
|
||||
# check status of acme on replica, result: CA is not installed
|
||||
result = self.replicas[0].run_command(['ipa-acme-manage', 'status'],
|
||||
raiseonerr=False)
|
||||
assert result.returncode == 1
|
||||
assert result.returncode == 3
|
||||
|
||||
# Install CA on replica
|
||||
tasks.install_ca(self.replicas[0])
|
||||
|
||||
Reference in New Issue
Block a user