@@ -25,6 +25,7 @@ def test_ipv4_static(self):
2525 })
2626
2727 expected = '''# config: /etc/network/interfaces
28+
2829auto eth0
2930iface eth0 inet static
3031address 10.0.0.1
@@ -52,6 +53,7 @@ def test_ipv6_static(self):
5253 })
5354
5455 expected = '''# config: /etc/network/interfaces
56+
5557auto eth0
5658iface eth0 inet6 static
5759address fe80::ba27:ebff:fe1c:5477
@@ -85,6 +87,7 @@ def test_multiple_static(self):
8587 })
8688
8789 expected = '''# config: /etc/network/interfaces
90+
8891auto eth0
8992iface eth0 inet static
9093address 10.0.0.1
@@ -113,6 +116,7 @@ def test_ipv4_dhcp(self):
113116 })
114117
115118 expected = '''# config: /etc/network/interfaces
119+
116120auto eth0
117121iface eth0 inet dhcp
118122
@@ -136,6 +140,7 @@ def test_ipv6_dhcp(self):
136140 })
137141
138142 expected = '''# config: /etc/network/interfaces
143+
139144auto eth0
140145iface eth0 inet6 dhcp
141146
@@ -164,6 +169,7 @@ def test_multiple_dhcp(self):
164169 })
165170
166171 expected = '''# config: /etc/network/interfaces
172+
167173auto eth0
168174iface eth0 inet dhcp
169175iface eth0 inet6 dhcp
@@ -203,6 +209,7 @@ def test_multiple_ip(self):
203209 })
204210
205211 expected = '''# config: /etc/network/interfaces
212+
206213auto eth0.1
207214iface eth0.1 inet static
208215address 192.168.1.1
@@ -235,6 +242,7 @@ def test_mtu(self):
235242 })
236243
237244 expected = '''# config: /etc/network/interfaces
245+
238246auto eth1
239247iface eth1 inet dhcp
240248pre-up /sbin/ifconfig $IFACE mtu 1500
@@ -260,6 +268,7 @@ def test_mac(self):
260268 })
261269
262270 expected = '''# config: /etc/network/interfaces
271+
263272auto eth1
264273iface eth1 inet dhcp
265274hwaddress 52:54:00:56:46:c0
@@ -297,6 +306,7 @@ def test_multiple_ip_and_dhcp(self):
297306 })
298307
299308 expected = '''# config: /etc/network/interfaces
309+
300310auto eth0
301311iface eth0 inet dhcp
302312iface eth0 inet static
@@ -330,12 +340,14 @@ def test_interface_with_resolv(self):
330340 })
331341
332342 expected = '''# config: /etc/network/interfaces
343+
333344auto eth0
334345iface eth0 inet static
335346address 192.168.1.1
336347netmask 255.255.255.0
337348
338349# config: /etc/resolv.conf
350+
339351nameserver 10.11.12.13
340352nameserver 8.8.8.8
341353search netjson.org
@@ -362,6 +374,7 @@ def test_loopback(self):
362374 })
363375
364376 expected = '''# config: /etc/network/interfaces
377+
365378auto lo
366379iface lo inet static
367380address 127.0.0.1
@@ -387,6 +400,7 @@ def test_adhoc_wireless(self):
387400 })
388401
389402 expected = '''# config: /etc/network/interfaces
403+
390404auto wireless
391405iface wireless inet static
392406address 172.128.1.1
@@ -414,6 +428,7 @@ def test_simple_bridge(self):
414428 })
415429
416430 expected = '''# config: /etc/network/interfaces
431+
417432auto br-lan
418433bridge_ports eth0 eth1
419434
@@ -444,6 +459,7 @@ def test_complex_bridge(self):
444459 })
445460
446461 expected = '''# config: /etc/network/interfaces
462+
447463auto brwifi
448464iface brwifi inet6 static
449465address fe80::8029:23ff:fe7d:c214
0 commit comments