Add a new scenario to add an SSH key, perform Git actions with it, and remove an SSH key
This will automatize the SSH part of https://docs.google.com/spreadsheets/d/15AtBb6s2p_HvtUe5G9GUSc2ngt69X8dO-418zMuT4us/edit?ts=5b07999b#gid=0 (internal document).
Steps of the automated QA scenario:
Part 1
-
Create an SSH (e.g. ED25519) keys pair (note: we already haveRuntime::Keysubclasses) -
Add its public key to a user => assert that the key has been created
Part 2
-
Create a project -
git clonethe project using the SSH URL (note: we already have a similarRepository::Pushfactory, and a similar clone scenario)
- We will need to use the private key created in 1. either using the
GIT_SSH_COMMANDenvironment variable, i.e.GIT_SSH_COMMAND='ssh -i /path/to/private/key' git clone ...or setting thecore.sshCommandGit config (might be better so that we do it only once)
-
Make a change to the project (e.g. add a README.md) -
git pushto the project => assert that the new file is visible in the project's home page and that its content is the expected one (note: we already have a similarRepository::Pushfactory, and a similar push scenario) -
Remove the SSH key
Edited by Rémy Coutable