Allow specifying the ssh key for the tests and loosen fallbacks to default ssh key #6563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows to specify a ssh key that is used in the tests by the environment variable
AIIDA_PYTEST_SSH_KEY
. Using~/.ssh/id_rsa
as key and not specifying the environment variable still should work as the fallbacks should start to work.The tests were relying on
~/.ssh/id_rsa
to be used to allow ssh to localhost. This had the side effect that several tests specified a ssh key in their configuration that was then not working in the authentication. A fallback to the default ssh key still allowed the tests to pass. Because of these fallbacks several tests had to be adapted.I am must say in hindsight this is not super useful, but I like that the tests do actually use the ssh key that is specified as this is nowhere mentioned and a bit confusing when adapting these parts of the code.
Requires #6450 to be merged before.