URL: https://github.com/freeipa/freeipa/pull/3813 Author: wladich Title: #3813: ipatests: check adding sudorule option does not produce false failure message Action: opened
PR body: """ Related to: https://pagure.io/freeipa/issue/7649 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/3813/head:pr3813 git checkout pr3813
From f5a184db51ed58df0067b430dfe3e6e1e6a5db4b Mon Sep 17 00:00:00 2001 From: Sergey Orlov <sor...@redhat.com> Date: Fri, 18 Oct 2019 17:33:45 +0200 Subject: [PATCH] ipatests: check adding sudorule option does not produce false failure message Related to: https://pagure.io/freeipa/issue/7649 --- ipatests/test_integration/test_sudo.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ipatests/test_integration/test_sudo.py b/ipatests/test_integration/test_sudo.py index eb651ad3a1..05c806dbae 100644 --- a/ipatests/test_integration/test_sudo.py +++ b/ipatests/test_integration/test_sudo.py @@ -750,3 +750,26 @@ def test_domain_resolution_order(self): finally: self.master.run_command( ['ipa', 'config-mod', '--domain-resolution-order=']) + + def test_sudooption_not_failing(self): + """Check there is no false error message when adding option to sudorule + + Regression test for https://pagure.io/freeipa/issue/7649 + """ + rule_name = 'sudooption_rule' + try: + self.master.run_command(['ipa', 'sudorule-add', rule_name]) + self.master.run_command(['ipa', 'sudorule-add-host', '--hosts', + self.master.hostname, rule_name]) + self.master.run_command(['ipa', 'sudorule-add-user', + '--groups=admins', rule_name]) + res = self.master.run_command([ + 'ipa', 'sudorule-add-option', '--sudooption=!authenticate', + rule_name]) + assert 'Rule name: {}'.format(rule_name) in res.stdout_text + assert 'Sudo Option: !authenticate' in res.stdout_text + assert not res.stderr_text + assert 'Failed' not in res.stdout_text + finally: + self.master.run_command(['ipa', 'sudorule-del', rule_name], + raiseonerr=False)
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org