mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
tests.unit.grains.core add scoped IPv6 nameserver
This commit is contained in:
parent
4e2e62d508
commit
d5561bedaf
1 changed files with 9 additions and 5 deletions
|
@ -39,6 +39,7 @@ IP4_ADD2 = '10.0.0.2'
|
|||
IP6_LOCAL = '::1'
|
||||
IP6_ADD1 = '2001:4860:4860::8844'
|
||||
IP6_ADD2 = '2001:4860:4860::8888'
|
||||
IP6_ADD_SCOPE = 'fe80::6238:e0ff:fe06:3f6b%enp2s0'
|
||||
OS_RELEASE_DIR = os.path.join(os.path.dirname(__file__), "os-releases")
|
||||
|
||||
|
||||
|
@ -673,15 +674,18 @@ PATCHLEVEL = 3
|
|||
'''
|
||||
resolv_mock = {'domain': '', 'sortlist': [], 'nameservers':
|
||||
[ipaddress.IPv4Address(IP4_ADD1),
|
||||
ipaddress.IPv6Address(IP6_ADD1)], 'ip4_nameservers':
|
||||
ipaddress.IPv6Address(IP6_ADD1),
|
||||
IP6_ADD_SCOPE], 'ip4_nameservers':
|
||||
[ipaddress.IPv4Address(IP4_ADD1)],
|
||||
'search': ['test.saltstack.com'], 'ip6_nameservers':
|
||||
[ipaddress.IPv6Address(IP6_ADD1)], 'options': []}
|
||||
[ipaddress.IPv6Address(IP6_ADD1),
|
||||
IP6_ADD_SCOPE], 'options': []}
|
||||
ret = {'dns': {'domain': '', 'sortlist': [], 'nameservers':
|
||||
[IP4_ADD1, IP6_ADD1], 'ip4_nameservers':
|
||||
[IP4_ADD1, IP6_ADD1,
|
||||
IP6_ADD_SCOPE], 'ip4_nameservers':
|
||||
[IP4_ADD1], 'search': ['test.saltstack.com'],
|
||||
'ip6_nameservers': [IP6_ADD1], 'options':
|
||||
[]}}
|
||||
'ip6_nameservers': [IP6_ADD1, IP6_ADD_SCOPE],
|
||||
'options': []}}
|
||||
self._run_dns_test(resolv_mock, ret)
|
||||
|
||||
def _run_dns_test(self, resolv_mock, ret):
|
||||
|
|
Loading…
Add table
Reference in a new issue