From c799f6a0bf28280b3b9c473c3888367d5bdbde58 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 25 May 2012 10:53:23 -0400 Subject: 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. --- ipalib/plugins/automount.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/plugins/automount.py') diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index ac9c9769..dda14cc7 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): -- cgit