3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

auto-t: fix hardcoded 'wlan1' in testNetconfig

This works, if testNetconfig is the only test. Otherwise it will always
fail since the interface naming increments for each test.
This commit is contained in:
James Prestwood 2022-06-22 16:02:19 -07:00 committed by Denis Kenzior
parent 72fac7f1b8
commit f4279ebf53
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class Test(unittest.TestCase):
rclog = open('/tmp/resolvconf.log', 'r') rclog = open('/tmp/resolvconf.log', 'r')
entries = rclog.readlines() entries = rclog.readlines()
rclog.close() rclog.close()
expected_rclog = ['-a wlan1.dns\n', 'nameserver 192.168.1.2\n', 'nameserver 3ffe:501:ffff:100::2\n'] expected_rclog = ['-a %s.dns\n' % ifname, 'nameserver 192.168.1.2\n', 'nameserver 3ffe:501:ffff:100::2\n']
# Every real resolvconf -a run overwrites the previous settings. Check the last three lines # Every real resolvconf -a run overwrites the previous settings. Check the last three lines
# of our log since we care about the end result here. # of our log since we care about the end result here.
self.assertEqual(expected_rclog, entries[-3:]) self.assertEqual(expected_rclog, entries[-3:])

View File

@ -75,7 +75,7 @@ class Test(unittest.TestCase):
rclog = open('/tmp/resolvconf.log', 'r') rclog = open('/tmp/resolvconf.log', 'r')
entries = rclog.readlines() entries = rclog.readlines()
rclog.close() rclog.close()
expected_rclog = ['-a wlan1.dns\n', 'nameserver 192.168.1.4\n', 'nameserver 3ffe:501:ffff:200::4\n'] expected_rclog = ['-a %s.dns\n' % ifname, 'nameserver 192.168.1.4\n', 'nameserver 3ffe:501:ffff:200::4\n']
# Every resolvconf -a run overwrites the previous settings. Check the last three lines # Every resolvconf -a run overwrites the previous settings. Check the last three lines
# of the log since we care about the end result here. # of the log since we care about the end result here.
self.assertEqual(expected_rclog, entries[-3:]) self.assertEqual(expected_rclog, entries[-3:])