summaryrefslogtreecommitdiffstats
path: root/test-directories.sh
diff options
context:
space:
mode:
authorClaudio Bandera <claudio.bandera@kit.edu>2016-04-24 17:09:59 +0200
committerClaudio Bandera <claudio.bandera@kit.edu>2016-04-24 17:09:59 +0200
commitd4a487f1fa4cc048f9ca50a3d47c4aa8d6dee8bd (patch)
tree3f42e162067611b6a504b491617b232952d17689 /test-directories.sh
parent50b6104983e6b1fb6ab7b545e3fc1eb1c28cd9a1 (diff)
downloadgit-sonar-d4a487f1fa4cc048f9ca50a3d47c4aa8d6dee8bd.tar.gz
git-sonar-d4a487f1fa4cc048f9ca50a3d47c4aa8d6dee8bd.zip
Merge remote-tracking branch 'upstream/master' into hotfix/unittests
Diffstat (limited to '')
-rwxr-xr-xtest-directories.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/test-directories.sh b/test-directories.sh
index 1777e69..219a9f3 100755
--- a/test-directories.sh
+++ b/test-directories.sh
@@ -64,7 +64,8 @@ test_record_timestamp_in_repo() {
test_time_to_update_when_timestamp_is_old() {
cd $scriptDir
- if [[ $OSTYPE == darwin* ]];then
+ FETCH_TIME="$((5 * 60))" # Fetch every 5 mins
+ if [[ $OSTYPE == darwin* ]];then
touch -A "-010000" "$(dot_git)/lastupdatetime"
else
newtimestamp=$(date -d "now -1 hour" +%Y%m%d%H%M)
@@ -75,6 +76,7 @@ test_time_to_update_when_timestamp_is_old() {
test_not_time_to_update_when_just_recorded() {
cd $scriptDir
+ FETCH_TIME="$((5 * 60))" # Fetch every 5 mins
record_timestamp
assertFalse time_to_update
}
@@ -83,6 +85,7 @@ test_time_to_update_when_no_timestamp() {
cd_to_tmp
git init --quiet
+ FETCH_TIME="$((5 * 60))" # Fetch every 5 mins
time_to_update
assertTrue time_to_update