diff options
author | James Falcon <TheRealFalcon@users.noreply.github.com> | 2021-01-26 15:51:35 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-26 15:51:35 -0600 |
commit | e7e7b42900d83d540d69adf37962864b53dab602 (patch) | |
tree | 999f962923823d226b2bd7de32320acd8f5a9885 /tests/integration_tests/bugs | |
parent | 5ccc8cbadb6b30ecbfe6e448ed5f7f000f05c7f1 (diff) | |
download | vyos-cloud-init-e7e7b42900d83d540d69adf37962864b53dab602.tar.gz vyos-cloud-init-e7e7b42900d83d540d69adf37962864b53dab602.zip |
Revert integration test associated with reverted #586 (#784)
Diffstat (limited to 'tests/integration_tests/bugs')
-rw-r--r-- | tests/integration_tests/bugs/test_gh586.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/integration_tests/bugs/test_gh586.py b/tests/integration_tests/bugs/test_gh586.py deleted file mode 100644 index 44b643f1..00000000 --- a/tests/integration_tests/bugs/test_gh586.py +++ /dev/null @@ -1,42 +0,0 @@ -"""Integration test for pull #586 - -If a non-default AuthorizedKeysFile is specified in /etc/ssh/sshd_config, -ensure we can still ssh as expected. -""" -import paramiko -import pytest -from io import StringIO -from tests.integration_tests.assets import get_test_rsa_keypair - - -public_rsa_key, private_rsa_key = get_test_rsa_keypair() -USER_DATA = """\ -#cloud-config -bootcmd: - - sed -i 's/#AuthorizedKeysFile.*/AuthorizedKeysFile\\ .ssh\\/authorized_keys2/' /etc/ssh/sshd_config -ssh_authorized_keys: - - {public_key} -""".format(public_key=public_rsa_key) # noqa: E501 - - -@pytest.mark.sru_2020_11 -@pytest.mark.user_data(USER_DATA) -def test_non_default_authorized_keys(client): - sshd = client.read_from_file('/etc/ssh/sshd_config') - assert 'AuthorizedKeysFile .ssh/authorized_keys2' in sshd - assert sshd.count('AuthorizedKeysFile') == 1 - - ssh_dir = client.execute('ls /home/ubuntu/.ssh').stdout - assert 'authorized_keys2' in ssh_dir - - ssh = paramiko.SSHClient() - ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - paramiko_key = paramiko.RSAKey.from_private_key(StringIO(private_rsa_key)) - - # Will fail with paramiko.ssh_exception.AuthenticationException - # if this bug isn't fixed - ssh.connect( - client.instance.ip, - username=client.instance.username, - pkey=paramiko_key, - ) |