Skip to content

integration_tests: use unique MAC addresses for tests#813

Merged
OddBloke merged 1 commit into
canonical:masterfrom
OddBloke:tests3
Feb 18, 2021
Merged

integration_tests: use unique MAC addresses for tests#813
OddBloke merged 1 commit into
canonical:masterfrom
OddBloke:tests3

Conversation

@OddBloke
Copy link
Copy Markdown
Collaborator

@OddBloke OddBloke commented Feb 17, 2021

Proposed Commit Message

integration_tests: use unique MAC addresses for tests

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.

Additional Info

This introduces tests/integration_tests/__init__.py as a holding place for the utility function this introduces; I didn't want to introduce a util, but it also didn't feel like it fit well in anything we currently had.

Test Steps

Run the affected tests in parallel a few times and observe a lack of collisions.

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny thing is I slightly prefer util.py to __init__.py. __init__.py has always seemed more "hidden" to me. But still +1 😄

@TheRealFalcon
Copy link
Copy Markdown
Contributor

Did we turn up a setting on pylint? The pylint issues don't seem related to what you've changed.

@OddBloke
Copy link
Copy Markdown
Collaborator Author

Did we turn up a setting on pylint? The pylint issues don't seem related to what you've changed.

I suspect that adding __init__ means that pylint now recurses in when previously it didn't? I'll address them.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants