mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-13 22:47:12 +03:00
test
This commit is contained in:
parent
ca294f9dd6
commit
499ccc6fd0
@ -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
|
||||
|
11
run_tests
11
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user