diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-05-25 10:53:23 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-05-31 20:16:29 -0400 |
commit | c799f6a0bf28280b3b9c473c3888367d5bdbde58 (patch) | |
tree | a7fc5db5174c524bc372569b9e8511895b780267 /ipalib/plugins/automount.py | |
parent | 895203c47780033b010cd1e0e9ccb21db835ea16 (diff) | |
download | freeipa-c799f6a0bf28280b3b9c473c3888367d5bdbde58.tar.gz freeipa-c799f6a0bf28280b3b9c473c3888367d5bdbde58.tar.xz freeipa-c799f6a0bf28280b3b9c473c3888367d5bdbde58.zip |
Add more automount tests
This adds tests for the automountlocation_tofiles and
automountlocation_import commands, and to automountmap_add_indirect
with the --parentmap option.
The tofiles test checks not only the XML-RPC output, but also the
output_for_cli method.
The import tests load data from tofiles output to the directory
and check that tofiles output matches.
This only works when all maps are connected to auto.master.
Two minor touches to the automount plugin itself: remove an extra
space, and don't hide the traceback when re-raising an exception.
Diffstat (limited to 'ipalib/plugins/automount.py')
-rw-r--r-- | ipalib/plugins/automount.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index ac9c9769f..dda14cc78 100644 --- a/ipalib/plugins/automount.py +++ b/ipalib/plugins/automount.py @@ -349,7 +349,7 @@ class automountlocation_tofiles(LDAPQuery): textui.print_plain(_('maps not connected to /etc/auto.master:')) for m in orphanmaps: textui.print_plain('---------------------------') - textui.print_plain('/etc/%s: ' % m['automountmapname']) + textui.print_plain('/etc/%s:' % m['automountmapname']) for k in orphankeys: if len(k) == 0: continue dn = DN(k[0]['dn']) @@ -391,7 +391,7 @@ class automountlocation_import(LDAPQuery): reason=_('File %(file)s not found') % {'file': filename} ) else: - raise e + raise return map def forward(self, *args, **options): |