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 | |
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')
-rw-r--r-- | tests/integration_tests/assets/__init__.py | 16 | ||||
-rwxr-xr-x | tests/integration_tests/assets/test_id_rsa | 38 | ||||
-rw-r--r-- | tests/integration_tests/assets/test_id_rsa.pub | 1 | ||||
-rw-r--r-- | tests/integration_tests/bugs/test_gh586.py | 42 |
4 files changed, 0 insertions, 97 deletions
diff --git a/tests/integration_tests/assets/__init__.py b/tests/integration_tests/assets/__init__.py deleted file mode 100644 index 0cf27982..00000000 --- a/tests/integration_tests/assets/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -import os -from collections import namedtuple -from pathlib import Path - -ASSET_DIR = Path(os.path.dirname(os.path.realpath(__file__))) -PRIVATE_RSA_KEY_PATH = ASSET_DIR / 'test_id_rsa' -PUBLIC_RSA_KEY_PATH = ASSET_DIR / 'test_id_rsa.pub' - - -def get_test_rsa_keypair(): - with PUBLIC_RSA_KEY_PATH.open() as public_file: - public_key = public_file.read() - with PRIVATE_RSA_KEY_PATH.open() as private_file: - private_key = private_file.read() - KeyPair = namedtuple('KeyPair', 'public_rsa_key private_rsa_key') - return KeyPair(public_key, private_key) diff --git a/tests/integration_tests/assets/test_id_rsa b/tests/integration_tests/assets/test_id_rsa deleted file mode 100755 index 1ef67135..00000000 --- a/tests/integration_tests/assets/test_id_rsa +++ /dev/null @@ -1,38 +0,0 @@ ------BEGIN OPENSSH PRIVATE K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+rkhF3wY9D4dpzRl9KQiVKIQLfqyUlO5PHWEGKh3gPRbHUv8GWSA463L3aSl26cnAmv -CE++Ssusa9cIczTO7H+BsFc7MpWJKrAAAAwQDELFCX4ES/0HcVlTH3IjoRtIvPMb6lq545 -hPXwOb9ZpBmrgd5byZ0cEkjgEklNUZ9A9QIxrPNlVsB+z8QU+sV1qsExrPA9Fo8t9vFApi -u6WFR5QbIl9A2fh+2wZR2i0ftsndGdy9zA4LBiBj4EzQYYG7PEzSHIvyGGc0iaG4YCP+D0 -ljbVv47DruKa3RYv8Feuevo2hhRBRLnwah8cqXyehprqwA96WOoRXZVPgz7LQHKKAVYKWY -THmWZfry/xGEUAAAAKamFtZXNAbmV3dAE= ------END OPENSSH PRIVATE KEY----- diff --git a/tests/integration_tests/assets/test_id_rsa.pub b/tests/integration_tests/assets/test_id_rsa.pub deleted file mode 100644 index c14c3ea5..00000000 --- a/tests/integration_tests/assets/test_id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCdjQD/2zz3UIqZLcIFUaAuN0SJ+Bh/zLce35MLf5qO8QhwSjF6+Aq3aZeg/Dg//lCtPhCaAbk3YmvhDl41yBnTPK2gCU3Fwz9H+ygqLjqGItICsw0SI6VWL+9t+rcO7lciJfx9kP7jGCrf6NDc8zHOoF/cBTpEAL0mP3ikEcJtoo9IV9ZTt+r8ki+6QohZyS9QKTM2JoBaineM1ITAVluop7YDXJ6x+BKkKbJyCA5U3+0ykV5WfyvPMb4snjtNKgFq/U/QUJ6BUqrmLIaEt0zhOdLdqNtIh/f5JIMwibLPOZeo/IbnPBwfzO4QjdpH0NMyaLj0eeNVfQA37rWJB/wwTP2eelQKdp6iCIjjN8lAgwoeKMZwVhHT3YGolSbLnSzbf2cUUHMIVFyYRF3KF/GusbmSkQ+WU8Y7gC4K1Hhpb3JVOp8M07Z19fnG8XxlqRQIx1Hsmia7NbT3tTzMcToQ5MhdVdq2UjVwe34p66BWuPMrZg0TUcR4YK3iXuqakBc= test@example 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, - ) |