mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix the failing dns test on Windows
Gets the name of the first interface on the system. Windows network interfaces don't have the same name across Window systems. YOu can even go as far as naming them whatever you want. The test was failing because the interface name was hard-coded as 'Ethernet'.
This commit is contained in:
parent
48936c2283
commit
33922c93c6
1 changed files with 5 additions and 1 deletions
|
@ -22,8 +22,12 @@ class WinDNSTest(ModuleCase):
|
|||
'''
|
||||
Test add and removing a dns server
|
||||
'''
|
||||
# Get a list of interfaces on the system
|
||||
interfaces = self.run_function('network.interfaces_names')
|
||||
skipIf(interfaces.count == 0, 'This test requires a network interface')
|
||||
|
||||
interface = interfaces[0]
|
||||
dns = '8.8.8.8'
|
||||
interface = 'Ethernet'
|
||||
# add dns server
|
||||
self.assertTrue(self.run_function('win_dns_client.add_dns', [dns, interface], index=42))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue