#7543 Fix of test_sudo_rule_restricted_to_one_hostmask_negative
Closed: fixed a year ago by rcritten. Opened 2 years ago by pcech.

Issue

_________ TestSudo.test_sudo_rule_restricted_to_one_hostmask_negative __________

self = <ipatests.test_integration.test_sudo.TestSudo object at 0x7fb1069e5080>

def test_sudo_rule_restricted_to_one_hostmask_negative(self):
result1 = self.list_sudo_commands("testuser1")
assert result1.returncode != 0
> assert "Sorry, user testuser1 may not run sudo on {}.".format(
self.clientname) in result1.stderr_text
E AssertionError: assert 'Sorry, user testuser1 may not run sudo on vm-171-135.' in 'sudo: a password is required\n'
E + where 'Sorry, user testuser1 may not run sudo on vm-171-135.' = <built-in method format of str object at 0x7fb106906bd0>('vm-171-135')
E + where <built-in method format of str object at 0x7fb106906bd0> = 'Sorry, user testuser1 may not run sudo on {}.'.format
E + and 'vm-171-135' = <ipatests.test_integration.test_sudo.TestSudo object at 0x7fb1069e5080>.clientname
E + and 'sudo: a password is required\n' = <pytest_multihost.ssh_command.SSHCommand object at 0x7fb1068d20b8>.stderr_text

test_integration/test_sudo.py:361: AssertionError

Steps to Reproduce

  1. Run test test_integration/test_sudo.py

Version/Release/Distribution

actual master from Apr 29, 2018

Additional info:

We can look at git log (sorted by commit date) ...

pcech@pcech ~/Projects/freeipa (master) $ git log --format="%cd %h %an %s"
...
Mon Apr 30 20:42:00 2018 +0200 c925b44f4 Christian Heimes Load certificate files as binary data
Mon Apr 30 19:39:52 2018 +0200 a4418963c Christian Heimes Remove contrib/nssciphersuite
Mon Apr 30 14:13:40 2018 +0200 3c66e388d Christian Heimes Compatibility with pytest 3.4
Mon Apr 30 11:04:35 2018 +0200 d5e5bd501 Stanislav Laznicka Add absolute_import to test_authselect
Sat Apr 28 16:35:16 2018 +0200 73c3495db Christian Heimes Use shutil to copy file
Sat Apr 28 16:35:16 2018 +0200 792adebfa Robbie Harwood Enable SPAKE support using krb5.conf.d snippet
Sat Apr 28 09:07:28 2018 +0200 6856a9f46 Rob Crittenden Log service start/stop/restart message
Sat Apr 28 09:06:21 2018 +0200 3d30cf603 Rob Crittenden Update project metadata in ipasetup.py.in
Sat Apr 28 08:44:25 2018 +0200 2d6d768d1 Alexander Bokovoy idoverrideuser-add: allow adding ssh key in web ui

How we can see those commits cannot change the error message. And if try to find new error message in IPA code, we get

pcech@pcech ~/Projects/freeipa (master) $ git grep -n 'sudo: a password is required'
ipatests/test_integration/test_sudo.py:190:        assert "sudo: a password is required" in result3.stderr_text

Metadata Update from @slaykovsky:
- Issue priority set to: normal
- Issue set to the milestone: FreeIPA 4.6.4

2 years ago

It seems that SSSD team has found the solution. I left this ticket open until we are sure.

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.6.5 (was: FreeIPA 4.6.4)

2 years ago

sssd ticket marked as fixed, closing.

Test passed in last night's nightly.

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata