mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
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
This commit is contained in:
committed by
Martin Kosek
parent
230261a1a5
commit
0b254e8b1e
@@ -589,6 +589,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'}),
|
||||
|
||||
Reference in New Issue
Block a user