test: add ssh key in travis script

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-04-08 23:46:08 +03:00
parent 541429c26e
commit 828f00bf86
2 changed files with 11 additions and 9 deletions
+11
View File
@@ -3,6 +3,17 @@
set -x
set -e
#NOTE: ssh keys for ssh test to be able to ssh to the localhost
ls -la ~/.ssh/
ssh-keygen -t rsa -N "" -f mykey
mkdir -p ~/.ssh
cp mykey ~/.ssh/id_rsa
cp mykey.pub ~/.ssh/id_rsa.pub
cat mykey.pub >> ~/.ssh/authorized_keys
ssh-keyscan 127.0.0.1 >> ~/.ssh/known_hosts
ssh 127.0.0.1 ls &> /dev/null
python -mtests
if [[ "$TRAVIS_PULL_REQUEST" == "false" && \