summaryrefslogtreecommitdiffstats
path: root/test-directories.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test-directories.sh')
-rwxr-xr-xtest-directories.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/test-directories.sh b/test-directories.sh
index 5dde303..219a9f3 100755
--- a/test-directories.sh
+++ b/test-directories.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
scriptDir="$(cd "$(dirname "$0")"; pwd)"
source "$scriptDir/radar-base.sh"
@@ -64,7 +65,12 @@ test_record_timestamp_in_repo() {
test_time_to_update_when_timestamp_is_old() {
cd $scriptDir
FETCH_TIME="$((5 * 60))" # Fetch every 5 mins
- touch -A "-010000" "$(dot_git)/lastupdatetime"
+ if [[ $OSTYPE == darwin* ]];then
+ touch -A "-010000" "$(dot_git)/lastupdatetime"
+ else
+ newtimestamp=$(date -d "now -1 hour" +%Y%m%d%H%M)
+ touch -t $newtimestamp "$(dot_git)/lastupdatetime"
+ fi;
assertTrue time_to_update
}