ipatests: test_subids: test subid-match shows UID of the owner

ipa subid-match should show UID of the owner instead of DN.

Related: https://pagure.io/freeipa/issue/8977

Signed-off-by: Michal Polovka <mpolovka@redhat.com>
Reviewed-By: Anuja More <amore@redhat.com>
This commit is contained in:
Michal Polovka 2021-11-24 15:45:34 +01:00
parent aefa5f2252
commit c18caaa7aa
No known key found for this signature in database
GPG Key ID: 4934889DC424FE12

View File

@ -253,3 +253,18 @@ class TestSubordinateId(IntegrationTest):
def test_subid_stats(self):
tasks.kinit_admin(self.master)
self.master.run_command(["ipa", "subid-stats"])
def test_sudid_match_shows_uid(self):
"""
Test if subid-match command shows UID of the owner instead of DN
https://pagure.io/freeipa/issue/8977
"""
uid = "admin"
self.subid_generate(uid)
info = self.assert_subid(uid, match=True)
subuid = info["ipasubuidnumber"]
result = self.master.run_command(["ipa", "subid-match",
f"--subuid={subuid}"])
owner = self._parse_result(result)["owner"]
assert owner == uid