diff --git a/.travis.yml b/.travis.yml index 59bf6ca..2f9b621 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ env: NGROK_TOKEN=1c1uvy5CSMYBuO3o7Jv3xgRugYF_XGEz3Atyjb7KMaxw5GeU before_install: - sudo apt-get update - sudo apt-get install zfsutils-linux + script: - - sudo -E ./ngrok.sh + # - sudo -E ./ngrok.sh - sudo -E ./run_tests # - sudo -E pip --version diff --git a/run_tests b/run_tests index 385c53b..ed797d6 100755 --- a/run_tests +++ b/run_tests @@ -1,9 +1,16 @@ #!/bin/bash #reactivate python environment, if any (usefull in Travis) -source $VIRTUAL_ENV/bin/activate +source $VIRTUAL_ENV/bin/activate || true -coverage run --source bin.zfs_autobackup -m unittest -v $@ +# test needs ssh access to localhost for testing +if ! [ -t ~/.ssh/id_rsa ]; then + ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' || exit 1 + cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys || exit 1 + ssh -oStrictHostKeyChecking=accept-new localhost true || exit 1 +fi + +coverage run --source bin.zfs_autobackup -m unittest -v $@ EXIT=$? echo