Fix issue #54: tests and the check for root access to proot

This commit is contained in:
Filippo Squillace 2015-01-17 19:14:12 +01:00
parent 239230ebf3
commit ca3be673a4
2 changed files with 3 additions and 1 deletions

View file

@ -176,7 +176,7 @@ function _run_proot(){
function _run_juju_with_proot(){
[ "$(_run_proot ${ID} 2> /dev/null )" == "0" ] && \
[ "$(_run_proot "" ${ID} 2> /dev/null )" == "0" ] && \
die "You cannot access with root privileges. Use --root option instead."
_run_proot "${@}"

View file

@ -24,6 +24,8 @@ function set_up(){
function tear_down(){
# the CA directories are read only and can be deleted only by changing the mod
[ -d ${JUJU_HOME}/etc/ca-certificates ] && chmod -R +w ${JUJU_HOME}/etc/ca-certificates
rm -rf $JUJU_HOME
rm -rf $ORIGIN_WD
rm -rf $JUJU_TEMPDIR