Skip to content

Commit

Permalink
Use /tmp directory as a default one during testing
Browse files Browse the repository at this point in the history
Since `/tmp` is used as a working directory for BATS tests, there is no
chance that any unexpected modifications will happen within mounted
project directory.

Also, the `/tmp` does not have an initialized git repository. This is
good as if we need a real repository, we have to use addon for it.
  • Loading branch information
extsoft committed Sep 30, 2019
1 parent c05bfb0 commit 51b4409
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/addons-common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e
THIS="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BIN_DIR="$THIS/../libexec"
export PATH=${BIN_DIR}:$PATH
# By default, all execution should work here.
cd /tmp

check(){
run "$@"
Expand Down

0 comments on commit 51b4409

Please sign in to comment.