Skip to content

Commit

Permalink
[airos] added test for dns servers list
Browse files Browse the repository at this point in the history
  • Loading branch information
edoput committed Aug 21, 2017
1 parent 352a901 commit 42465cc
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/airos/test_resolv.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,26 @@ def test_no_dns_server(self):
]

self.assertEqualConfig(o.intermediate_data['resolv'], expected)

def test_dns_server(self):
o = self.backend({
"dns_servers": [
"192.168.1.1"
],
})
o.to_intermediate()
expected = [
{
'host.1.name': 'airos',
'host.1.status': 'enabled',
},
{
'nameserver.1.ip': '192.168.1.1',
'nameserver.1.status': 'enabled'
},
{
'status': 'enabled',
},
]

self.assertEqualConfig(o.intermediate_data['resolv'], expected)

0 comments on commit 42465cc

Please sign in to comment.