`server-addresses` has extraneous but duplicative dict-list in 'zone' clause.
egberts opened this issue · 2 comments
egberts commented
For the following server-addresses
in zone clause:
server-addresses { fb03::7 port 9553; 9.9.9.9; };
Was expecting
'server_addresses': [ {'addr': 'fb03::7', 'ip_port': '9553'},
{'addr': '9.9.9.9'}]
Actually getting:
'server_addresses': [ { 'addr': 'fb03::7',
'ip46_addr_port': ['fb03::7', '9553'],
'ip_port': '9553'},
{ 'addr': '9.9.9.9',
'ip46_addr_port': ['9.9.9.9']}],
I think this was something I walked away during last Jan 2021.
egberts commented
$ python3 -munittest tests.test_zone.TestZone.test_isc_zone_stmt_server_addresses_mixed_ip46_passing
Match server-addresses { <ip46_addr> [ port <port_number> ]; ... }; at loc 0(1,1)
Matched server-addresses { <ip46_addr> [ port <port_number> ]; ... }; -> [['1.1.1.1'], ['fb22::2', '222'], ['3.3.3.3', '3333'], ['fc44::4']]
Good result:
{ 'server_addresses': [ {'addr': '1.1.1.1'},
{'addr': 'fb22::2', 'ip_port': '222'},
{'addr': '3.3.3.3', 'ip_port': '3333'},
{'addr': 'fc44::4'}]}
expecting:
{ 'server_addresses': [ {'addr': '1.1.1.1'},
{'addr': 'fb22::2', 'ip_port': '222'},
{'addr': '3.3.3.3', 'ip_port': '3333'},
{'addr': 'fc44::4'}]}
assert(True)
.
----------------------------------------------------------------------
Ran 1 test in 0.002s
OK