summaryrefslogtreecommitdiff
path: root/tests/integration_tests/bugs/test_gh668.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2021-02-18 11:17:26 -0500
committerGitHub <noreply@github.com>2021-02-18 11:17:26 -0500
commit5a9008e53d7cf987b5cfb78964d2bd987d180993 (patch)
tree91227d5a71d103500b2b8bc4f4bba12739ba5fdb /tests/integration_tests/bugs/test_gh668.py
parent6056ccd4d4a8a1a314ab8cd6d2bebdf8ae39b35c (diff)
downloadvyos-cloud-init-5a9008e53d7cf987b5cfb78964d2bd987d180993.tar.gz
vyos-cloud-init-5a9008e53d7cf987b5cfb78964d2bd987d180993.zip
integration_tests: use unique MAC addresses for tests (#813)
Using the same MAC address results in strange test behaviour if more than one such instance is up: traffic gets routed to an arbitrary interface with the given MAC address. This can happen if running tests in parallel, or on a system which retains test instances from previous runs. The introduction of tests/integration_tests/__init__.py means that pylint now checks the integration tests: this commit also addresses those failures.
Diffstat (limited to 'tests/integration_tests/bugs/test_gh668.py')
-rw-r--r--tests/integration_tests/bugs/test_gh668.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/integration_tests/bugs/test_gh668.py b/tests/integration_tests/bugs/test_gh668.py
index 66ee302e..72fe0afc 100644
--- a/tests/integration_tests/bugs/test_gh668.py
+++ b/tests/integration_tests/bugs/test_gh668.py
@@ -7,12 +7,13 @@ for all network configuration outputs.
import pytest
+from tests.integration_tests import random_mac_address
from tests.integration_tests.instances import IntegrationInstance
DESTINATION_IP = "172.16.0.10"
GATEWAY_IP = "10.0.0.100"
-MAC_ADDRESS = "de:ad:be:ef:12:34"
+MAC_ADDRESS = random_mac_address()
NETWORK_CONFIG = """\
version: 2