mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: Add test for ipa automountlocation-tofiles
Only the first key of orphaned automount keys was being displayed. tofiles was created because making sense of LDAP automount information is a brain squeezer. The purpose is not to display in a precise file format but to display it in a sensible and understandable way. https://pagure.io/freeipa/issue/7814 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com>
This commit is contained in:
parent
3e9bb606b4
commit
14062c774b
@ -1522,3 +1522,51 @@ class TestIPACommandWithoutReplica(IntegrationTest):
|
|||||||
)
|
)
|
||||||
# Run the command again after cache is removed
|
# Run the command again after cache is removed
|
||||||
self.master.run_command(['ipa', 'user-show', 'ipauser1'])
|
self.master.run_command(['ipa', 'user-show', 'ipauser1'])
|
||||||
|
|
||||||
|
|
||||||
|
class TestIPAautomount(IntegrationTest):
|
||||||
|
@classmethod
|
||||||
|
def install(cls, mh):
|
||||||
|
tasks.install_master(cls.master, setup_dns=True)
|
||||||
|
|
||||||
|
def test_tofiles_orphan_keys(self):
|
||||||
|
"""
|
||||||
|
Validate automountlocation-tofiles output
|
||||||
|
|
||||||
|
automount in LDAP is difficult to keep straight so a client-side
|
||||||
|
map generator was created.
|
||||||
|
"""
|
||||||
|
tasks.kinit_admin(self.master)
|
||||||
|
|
||||||
|
self.master.run_command(
|
||||||
|
[
|
||||||
|
'ipa',
|
||||||
|
'automountmap-add', 'default',
|
||||||
|
'auto.test'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
self.master.run_command(
|
||||||
|
[
|
||||||
|
'ipa',
|
||||||
|
'automountkey-add', 'default',
|
||||||
|
'auto.test',
|
||||||
|
'--key', '/test',
|
||||||
|
'--info', 'nfs.example.com:/exports/test'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
self.master.run_command(
|
||||||
|
[
|
||||||
|
'ipa',
|
||||||
|
'automountkey-add', 'default',
|
||||||
|
'auto.test',
|
||||||
|
'--key', '/test2',
|
||||||
|
'--info', 'nfs.example.com:/exports/test2'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
result = self.master.run_command(
|
||||||
|
[
|
||||||
|
'ipa', 'automountlocation-tofiles', 'default'
|
||||||
|
]
|
||||||
|
).stdout_text
|
||||||
|
assert '/test' in result
|
||||||
|
assert '/test2' in result
|
||||||
|
Loading…
Reference in New Issue
Block a user