mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix structured DNS record output
Recent LDAP refactoring replaced entry_attrs regular dict with normalized keys (i.e. lowercase) with LDAPEntry instance which keys may not be normalized. This broke CND command output when --structured and --all options were used. Force lowercase normalization of the LDAPEntry keys in DNS plugin structured format postprocessing. Also add a missing test for DNS record structured output. https://fedorahosted.org/freeipa/ticket/3526
This commit is contained in:
@@ -1078,6 +1078,34 @@ class test_dns(Declarative):
|
||||
},
|
||||
),
|
||||
|
||||
dict(
|
||||
desc='Show record %r in zone %r with --structured and --all options'\
|
||||
% (dnsrev1, revdnszone1),
|
||||
command=('dnsrecord_show', [revdnszone1, dnsrev1],
|
||||
{'structured': True, 'all': True}),
|
||||
expected={
|
||||
'value': dnsrev1,
|
||||
'summary': None,
|
||||
'result': {
|
||||
'dn': dnsrev1_dn,
|
||||
'idnsname': [dnsrev1],
|
||||
'objectclass': objectclasses.dnsrecord,
|
||||
'dnsrecords': [
|
||||
{
|
||||
'dnstype': u'PTR',
|
||||
'dnsdata': u'foo-1.example.com.',
|
||||
'ptr_part_hostname': u'foo-1.example.com.'
|
||||
},
|
||||
{
|
||||
'dnstype': u'CNAME',
|
||||
'dnsdata': u'foo-1.example.com.',
|
||||
'cname_part_hostname': u'foo-1.example.com.'
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
|
||||
dict(
|
||||
desc='Update global DNS settings',
|
||||
command=('dnsconfig_mod', [], {'idnsforwarders' : [u'80.142.15.80'],}),
|
||||
|
||||
Reference in New Issue
Block a user