diff options
| author | James Falcon <TheRealFalcon@users.noreply.github.com> | 2020-12-03 16:41:46 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-03 17:41:46 -0500 |
| commit | 06f7b4522aaa2f5c7f773f42f6c88aed50bb00d5 (patch) | |
| tree | 3a9d38e0a8f5635d10347bcfa91ea5b2c96fa9f8 /tests/integration_tests/assets/__init__.py | |
| parent | 6c4e87bf336073183f8ae8964366d574c7ee4823 (diff) | |
| download | vyos-cloud-init-06f7b4522aaa2f5c7f773f42f6c88aed50bb00d5.tar.gz vyos-cloud-init-06f7b4522aaa2f5c7f773f42f6c88aed50bb00d5.zip | |
Integration test for pull #586 (#706)
If a non-default AuthorizedKeysFile is specified in
/etc/ssh/sshd_config, ensure we can still ssh as expected
Diffstat (limited to 'tests/integration_tests/assets/__init__.py')
| -rw-r--r-- | tests/integration_tests/assets/__init__.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/integration_tests/assets/__init__.py b/tests/integration_tests/assets/__init__.py new file mode 100644 index 00000000..0cf27982 --- /dev/null +++ b/tests/integration_tests/assets/__init__.py @@ -0,0 +1,16 @@ +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) |
