Skip to content

Commit

Permalink
test:integration: Try to improve test flakyness (Closes: #1069871)
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon committed Jun 25, 2024
1 parent b973028 commit a8705b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions tests/integration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,19 @@ def shutdown_devices(klass):

subprocess.check_call(['ip', 'link', 'del', 'dev', klass.dev_e_ap])
subprocess.check_call(['ip', 'link', 'del', 'dev', klass.dev_e2_ap])
subprocess.call(['ip', 'link', 'del', 'dev', klass.dev_e_client],
stderr=subprocess.PIPE)
subprocess.call(['ip', 'link', 'del', 'dev', klass.dev_e2_client],
stderr=subprocess.PIPE)
klass.dev_e_ap = None
klass.dev_e_client = None
klass.dev_e2_ap = None
klass.dev_e2_client = None

subprocess.call(['ip', 'link', 'del', 'dev', 'iface1'],
stderr=subprocess.PIPE)
subprocess.call(['ip', 'link', 'del', 'dev', 'iface2'],
stderr=subprocess.PIPE)
subprocess.call(['ip', 'link', 'del', 'dev', 'mybr'],
stderr=subprocess.PIPE)
subprocess.call(['ip', 'link', 'del', 'dev', 'nptestsrv'],
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/ethernets.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_manual_addresses(self):
subprocess.check_output(['ip', '-6', 'route', 'show', 'dev', self.dev_e2_client]))

def test_dhcp6(self):
self.setup_eth('slaac')
self.setup_eth('') # empty string, as we want stateful DHCPv6 without SLAAC IP
with open(self.config, 'w') as f:
f.write('''network:
version: 2
Expand All @@ -208,7 +208,7 @@ def test_dhcp6(self):
self.assert_iface_up(self.dev_e_client, ['inet6 2600:'], ['inet 192.168'])

def test_ip6_token(self):
self.setup_eth('slaac')
self.setup_eth('ra-only')
with open(self.config, 'w') as f:
f.write('''network:
version: 2
Expand Down

0 comments on commit a8705b5

Please sign in to comment.