Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: mock uses_systemd in ssh password tests (SC-1040) #1449

Merged
merged 3 commits into from
May 12, 2022

Conversation

TheRealFalcon
Copy link
Member

Proposed Commit Message

testing: mock uses_systemd in ssh password tests

Tests currently assume systemd, so add a mock such that uses_systemd
always returns True.

Additional Context

Dailies are failing. See
https://launchpadlibrarian.net/600835820/buildlog_ubuntu-jammy-amd64.cloud-init_22.1-3228-g3e5938c6-0ubuntu1+1959~trunk~ubuntu22.04.1_BUILDING.txt.gz

Test Steps

I haven't actually reproduced the errors on a local machine, but based on the failures I would be surprised if the new mock doesn't work.

Tests currently assume systemd, so add a mock such that uses_systemd
always returns True.
@TheRealFalcon TheRealFalcon changed the title testing: mock uses_systemd in ssh password tests testing: mock uses_systemd in ssh password tests (SC-1040) May 11, 2022
Copy link
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.

Looks good and fixes the specific leak.

I'll probably provide a followup PR to refactor some of those tests to get both systemd and non_systemd environments.

UPDATE: here is an update/diff against your current PR instead of main.
TheRealFalcon/cloud-init@fix-dailies...blackboxsw:fix-dailies

blackboxsw and others added 2 commits May 12, 2022 11:25
- Also refactor a couple CiTestCases to pytest
- use get_cloud instead of self.tmp_cloud where possible
@TheRealFalcon
Copy link
Member Author

@blackboxsw , thanks for this! I incorporated your changes with a couple small tweaks. Will merge assuming CI passes.

@TheRealFalcon TheRealFalcon merged commit 136ccae into canonical:main May 12, 2022
@TheRealFalcon TheRealFalcon deleted the fix-dailies branch May 12, 2022 19:39
aciba90 pushed a commit to aciba90/cloud-init that referenced this pull request May 13, 2022
…nical#1449)

- Also refactor a couple CiTestCases to pytest
- use get_cloud instead of self.tmp_cloud where possible

Co-authored-by: Chad Smith <chad.smith@canonical.com>
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