Skip to content

Commit

Permalink
test-keyfile: mark ip6-privacy=0 as a default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon committed Dec 10, 2021
1 parent d9502d7 commit 7ca04c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions tests/parser/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def normalize_keyfile(self, file_contents):
# Normalize lines
if k == 'addr-gen-mode':
v = v.replace('1', 'stable-privacy').replace('0', 'eui64')
elif k == 'ip6-privacy' and v == '0':
continue
elif k == 'wake-on-lan' and v == '1':
continue
elif k == 'stp' and v == 'true':
Expand Down
8 changes: 0 additions & 8 deletions tests/parser/test_keyfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def test_keyfile_gsm(self):
[ipv6]
dns-search=
ip6-privacy=0
method=auto
'''.format(UUID))
self.assert_netplan({UUID: '''network:
Expand All @@ -95,7 +94,6 @@ def test_keyfile_gsm(self):
gsm.home-only: "true"
ipv4.dns-search: ""
ipv6.dns-search: ""
ipv6.ip6-privacy: "0"
'''.format(UUID, UUID)})

def test_keyfile_cdma(self):
Expand Down Expand Up @@ -267,7 +265,6 @@ def test_keyfile_method_manual(self):
method=manual
address1=1:2:3::9/128
gateway=6:6::6
ip6-privacy=0
route1=dead:beef::1/128,2001:1234::2
route1_options=unknown=invalid,
Expand Down Expand Up @@ -319,7 +316,6 @@ def test_keyfile_method_manual(self):
ipv4.method: "manual"
ipv4.address1: "1.2.3.4/24,8.8.8.8"
ipv6.dns-search: "bar.local"
ipv6.ip6-privacy: "0"
ipv6.route1: "dead:beef::1/128,2001:1234::2"
ipv6.route1_options: "unknown=invalid,"
proxy._: ""
Expand Down Expand Up @@ -1001,7 +997,6 @@ def test_keyfile_customer_A2(self):
[ipv6]
method=auto
ip6-privacy=0
addr-gen-mode=1
'''.format(UUID))
self.assert_netplan({UUID: '''network:
Expand Down Expand Up @@ -1029,7 +1024,6 @@ def test_keyfile_customer_A2(self):
ipv4.address1: "10.10.28.159/24"
ipv4.address2: "10.10.164.254/24"
ipv4.address3: "10.10.246.132/24"
ipv6.ip6-privacy: "0"
ipv6.addr-gen-mode: "1"
'''.format(UUID, UUID)})

Expand Down Expand Up @@ -1065,7 +1059,6 @@ def test_keyfile_netplan0103_compat(self):
address2=dcba::beef/56
dns=1::cafe;2::cafe;
dns-search=wallaceandgromit.com;
ip6-privacy=0
method=manual
route1=1:2:3:4:5:6:7:8/64,8:7:6:5:4:3:2:1,3
route2=2001::1000/56,2001::1111,1
Expand Down Expand Up @@ -1138,6 +1131,5 @@ def test_keyfile_netplan0103_compat(self):
ipv4.route4: "3.3.3.3/6,0.0.0.0,4"
ipv4.route4_options: "cwnd=10,mtu=1492,src=1.2.3.4"
ipv6.dns-search: "wallaceandgromit.com;"
ipv6.ip6-privacy: "0"
proxy._: ""
'''.format(UUID, UUID)})

0 comments on commit 7ca04c2

Please sign in to comment.