From 0d26420b15bccf1f57535b9b2f4bf43d7ef72e4e Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Sun, 17 May 2020 14:19:23 +0200 Subject: [PATCH] test --- run_tests | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/run_tests b/run_tests index 4ab70da..b8dbb4f 100755 --- a/run_tests +++ b/run_tests @@ -1,12 +1,17 @@ #!/bin/bash +if [ "$USER" != "root" ]; then + echo "Need root to do proper zfs testing" + exit 1 +fi + #reactivate python environment, if any (usefull in Travis) source $VIRTUAL_ENV/bin/activate || true # 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 +if ! [ -t /root/.ssh/id_rsa ]; then + ssh-keygen -t rsa -f /root/.ssh/id_rsa -P '' || exit 1 + cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys || exit 1 ssh -oStrictHostKeyChecking=no localhost true || exit 1 fi