mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Reproducer for bug in structured dnsrecord_show
"RuntimeError: dictionary changed size during iteration" in ipaserver/plugins/dns.py", line 3209, in postprocess_record https://pagure.io/freeipa/issue/7275 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
parent
197b5ca639
commit
191605efd6
@ -268,6 +268,7 @@ absnxname = u'does.not.exist.test.'
|
||||
arec1 = u'172.16.29.111'
|
||||
arec2 = u'172.31.254.222'
|
||||
arec3 = u'172.16.250.123'
|
||||
aaaarec1 = u'ff02::1'
|
||||
|
||||
fwd_ip = u'172.16.31.80'
|
||||
allowtransfer_tofwd = u'%s;' % fwd_ip
|
||||
@ -1087,18 +1088,43 @@ class test_dns(Declarative):
|
||||
|
||||
dict(
|
||||
desc='Modify AAAA record in %r in zone %r' % (name1, zone1),
|
||||
command=('dnsrecord_mod', [zone1, name1], {'aaaarecord': u'ff02::1'}),
|
||||
command=(
|
||||
'dnsrecord_mod', [zone1, name1], {'aaaarecord': aaaarec1}
|
||||
),
|
||||
expected={
|
||||
'value': name1_dnsname,
|
||||
'summary': None,
|
||||
'result': {
|
||||
'idnsname': [name1_dnsname],
|
||||
'arecord': [arec3],
|
||||
'aaaarecord': [u'ff02::1'],
|
||||
'aaaarecord': [aaaarec1],
|
||||
},
|
||||
},
|
||||
),
|
||||
|
||||
dict(
|
||||
desc=('Show record %r in zone %r with --structured and --all '
|
||||
'options' % (name1, zone1)),
|
||||
command=('dnsrecord_show', [zone1, name1],
|
||||
{'structured': True, 'all': True}),
|
||||
expected={
|
||||
'value': name1_dnsname,
|
||||
'summary': None,
|
||||
'result': {
|
||||
'dn': name1_dn,
|
||||
'idnsname': [name1_dnsname],
|
||||
'objectclass': objectclasses.dnsrecord,
|
||||
'dnsrecords': [
|
||||
{u'aaaa_part_ip_address': aaaarec1,
|
||||
u'dnsdata': aaaarec1,
|
||||
u'dnstype': u'AAAA'},
|
||||
{u'a_part_ip_address': arec3,
|
||||
u'dnsdata': arec3,
|
||||
u'dnstype': u'A'}
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
|
||||
dict(
|
||||
desc='Remove AAAA record from %r in zone %r using dnsrecord_mod' % (name1, zone1),
|
||||
@ -2846,6 +2872,33 @@ class test_dns(Declarative):
|
||||
},
|
||||
),
|
||||
|
||||
dict(
|
||||
desc='Show structured record %r in zone %r' % (
|
||||
u'_foo._tcp', idnzone1
|
||||
),
|
||||
command=(
|
||||
'dnsrecord_show', [idnzone1, u'_foo._tcp'],
|
||||
{u'structured': True, u'all': True}
|
||||
),
|
||||
expected={
|
||||
'value': DNSName(u'_foo._tcp'),
|
||||
'summary': None,
|
||||
'result': {
|
||||
'dn': DN(('idnsname', u'_foo._tcp'), idnzone1_dn),
|
||||
'idnsname': [DNSName(u'_foo._tcp')],
|
||||
'dnsrecords': [{
|
||||
u'dnsdata': u'0 100 1234 {}'.format(
|
||||
idnzone1_mname_punycoded),
|
||||
u'dnstype': u'SRV',
|
||||
u'srv_part_port': u'1234',
|
||||
u'srv_part_priority': u'0',
|
||||
u'srv_part_target': idnzone1_mname,
|
||||
u'srv_part_weight': u'100'
|
||||
}],
|
||||
'objectclass': objectclasses.dnsrecord,
|
||||
},
|
||||
},
|
||||
),
|
||||
|
||||
dict(
|
||||
desc='Add AFSDB record to %r using dnsrecord_add' % (dnsafsdbres1),
|
||||
|
Loading…
Reference in New Issue
Block a user