diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-09-14 12:05:12 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-09-24 13:55:30 +0200 |
commit | 909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555 (patch) | |
tree | 6e3606c7d3faaf690a8d3ac0a3993a552fadf3fb /tests | |
parent | 30da5d41652ac5adb1f76182ba170393573111e9 (diff) | |
download | freeipa.git-909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555.tar.gz freeipa.git-909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555.tar.xz freeipa.git-909b8ffbdfcff701fdf9c7133fceb5bf4c7a2555.zip |
Always handle NotFound error in dnsrecord-mod
When there were no updated attrs when modifying a nonexistent DNS record,
the error was not handled and caused an internal server error later (old_entry
was used uninitialized).
https://fedorahosted.org/freeipa/ticket/3055
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_xmlrpc/test_dns_plugin.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_dns_plugin.py b/tests/test_xmlrpc/test_dns_plugin.py index 6a54bcb6..3c2dc005 100644 --- a/tests/test_xmlrpc/test_dns_plugin.py +++ b/tests/test_xmlrpc/test_dns_plugin.py @@ -590,6 +590,16 @@ class test_dns(Declarative): dict( + desc='Try to modify nonexistent record in zone %r' % dnszone1, + command=('dnsrecord_mod', + [dnszone1, u'ghostname'], + {'aaaarecord': u'f001:baad::1'}), + expected=errors.NotFound( + reason=u'ghostname: DNS resource record not found'), + ), + + + dict( desc='Modify AAAA record in %r in zone %r' % (dnsres1, dnszone1), command=('dnsrecord_mod', [dnszone1, dnsres1], {'aaaarecord': u'ff02::1'}), expected={ |