Skip to content

testing: Remove calls to 'install_new_cloud_init'#1092

Merged
TheRealFalcon merged 1 commit into
canonical:mainfrom
TheRealFalcon:fix-integration
Nov 2, 2021
Merged

testing: Remove calls to 'install_new_cloud_init'#1092
TheRealFalcon merged 1 commit into
canonical:mainfrom
TheRealFalcon:fix-integration

Conversation

@TheRealFalcon
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon commented Nov 2, 2021

Proposed Commit Message

testing: Remove calls to 'install_new_cloud_init'

In our integration tests, a few tests were modifying the environment and
then calling 'install_new_cloud_init'. This is problematic because it
updates the environment for all future tests.

Existing instances of 'install_new_cloud_init' aren't problematic because
they aren't modifying the underlying environment.

Additional Context

Test Steps

Since this involves one test affecting tests run after it, the whole suite of tests was run for lxd containers. I also verified the updated GCE test on GCE.

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

In our integration tests, a few tests were modifying the environment and
then calling 'install_new_cloud_init'. This is problematic because it
updates the environment for all future tests.

Other instances of 'install_new_cloud_init' aren't problematic because
they aren't modifying the underlying environment.
@pytest.mark.lxd_vm
@pytest.mark.ubuntu # Because netplan
def test_lxd_datasource_discovery(session_cloud: IntegrationCloud):
def test_lxd_datasource_discovery(client: IntegrationInstance):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Most of the changes in this test are just indentation

@TheRealFalcon
Copy link
Copy Markdown
Contributor Author

TheRealFalcon commented Nov 2, 2021

I had a successful local lxd_container run with the daily-ppa on impish.

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. Makes sense here that we no longer modify the base image under test :(.

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