Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/integration_tests/modules/test_ssh_keysfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from io import StringIO
from paramiko.ssh_exception import SSHException

from tests.integration_tests.clouds import ImageSpecification
from tests.integration_tests.instances import IntegrationInstance
from tests.integration_tests.util import get_test_rsa_keypair

Expand Down Expand Up @@ -77,7 +78,12 @@ def common_verify(client, expected_keys):
# Ensure we haven't messed with any /home permissions
# See LP: #1940233
home_dir = '/home/{}'.format(user)
home_perms = '755'
# Home permissions aren't consistent between releases. On ubuntu
# this can change to 750 once focal is unsupported.
if ImageSpecification.from_os_image().release in ("bionic", "focal"):
home_perms = '755'
else:
home_perms = '750'
if user == 'root':
home_dir = '/root'
home_perms = '700'
Expand Down