URL: https://github.com/freeipa/freeipa/pull/4440 Author: abbra Title: #4440: [Backport][ipa-4-8] ipatests: always skip additional input for group-add-member --external Action: opened
PR body: """ This PR was opened automatically because PR #4420 was pushed to master and backport to ipa-4-8 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/4440/head:pr4440 git checkout pr4440
From bf2ca1c0c4e747501b8c6b1fa20f2a4c4a4f487f Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <aboko...@redhat.com> Date: Mon, 23 Mar 2020 23:04:04 +0200 Subject: [PATCH] ipatests: always skip additional input for group-add-member --external 'ipa group-add-member groupname --external some-object' will attempt to ask interactive questions about other optional parameters (users and groups) if only external group member was specified. This leads to a timeout in the tests as there is no input provided. Do not wait for the entry that would never come by using 'ipa -n'. Related: https://pagure.io/freeipa/issue/8236 Signed-off-by: Alexander Bokovoy <aboko...@redhat.com> --- ipatests/test_integration/test_sssd.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ipatests/test_integration/test_sssd.py b/ipatests/test_integration/test_sssd.py index 872863a737..8e2f62c083 100644 --- a/ipatests/test_integration/test_sssd.py +++ b/ipatests/test_integration/test_sssd.py @@ -11,6 +11,7 @@ import re import pytest +import subprocess import textwrap from ipatests.test_integration.base import IntegrationTest @@ -19,7 +20,6 @@ from ipaplatform.osinfo import osinfo from ipaplatform.paths import paths from ipapython.dn import DN -from ipalib import errors class TestSSSDWithAdTrust(IntegrationTest): @@ -318,9 +318,8 @@ def test_ext_grp_with_ldap(self): self.master.run_command( ['ipa', 'group-add-member', '--group', ext_group, user]) self.master.run_command([ - 'ipa', 'group-add-member', '--external', - self.users['ad']['name'], ext_group, - '--users=', '--groups=']) + 'ipa', '-n', 'group-add-member', '--external', + self.users['ad']['name'], ext_group]) tasks.clear_sssd_cache(self.master) tasks.clear_sssd_cache(client) try: @@ -344,11 +343,11 @@ def test_external_group_member_mismatch(self, user_origin): master.run_command(['ipa', 'group-add', '--external', 'ext-ipatest']) try: - master.run_command(['ipa', 'group-add-member', + master.run_command(['ipa', '-n', 'group-add-member', 'ext-ipatest', '--external', self.users[user_origin]['name']]) - except errors.ValidationError: + except subprocess.CalledProcessError: # Only 'ipa' origin should throw a validation error assert user_origin == 'ipa' finally:
_______________________________________________ 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