diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration_tests/modules/test_ssh_keysfile.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/integration_tests/modules/test_ssh_keysfile.py b/tests/integration_tests/modules/test_ssh_keysfile.py index 3159feb9..5c720578 100644 --- a/tests/integration_tests/modules/test_ssh_keysfile.py +++ b/tests/integration_tests/modules/test_ssh_keysfile.py @@ -3,6 +3,7 @@ import pytest 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 @@ -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' |