integration_tests: introduce lxd_use_exec mark#802
Merged
Conversation
pycloudlib has modified the way LXD executes tests (canonical/pycloudlib#114): it will always use SSH to access them by default, instead of using `lxc exec`. This behaviour is transparent for them majority of cloud-init's integration tests, but some currently depend on using `lxc exec` to access instances with (intentionally) broken networking: obviously these are not accessible via SSH. pycloudlib retains support for switching an instance to use `lxc exec`. This commit introduces the `lxd_use_exec` mark, which tests can use to indicate to the integration testing framework that they should be so switched, and applies it to all applicable tests.
blackboxsw
reviewed
Feb 19, 2021
Collaborator
Author
None immediately present themselves to me. Such cases can be handled today, something like: @pytest.mark.lxc_use_exec
def test_example(client):
client.execute("unbreak-ssh-access-somehow")
client.instance.execute_via_ssh = True
client.execute("echo ssh works")If we see more than one or two such cases, we should look at improving the API. |
TheRealFalcon
approved these changes
Feb 22, 2021
This was referenced May 12, 2023
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Commit Message
Additional Context
See canonical/pycloudlib#114
Test Steps
CI tests will indicate that LXD containers work, a manual run is required for LXD VMs.
Checklist: