about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-12-05T16·16-0500
committerShea Levy <shea@shealevy.com>2017-12-05T16·16-0500
commit11a7f8ce14afbdc60b9acf424d941ccda1adc141 (patch)
treefbd99244f4fe0c346d26b770580cb37a993cbb4a /tests
parent7f2c324ed18cba4004ff89dfd84cf2df979b2571 (diff)
parenteedbc4e06c017d84814b4c1fad8c6b6db958f3da (diff)
Merge branch 'fetchGit-fast-revision-update'
Diffstat (limited to 'tests')
-rw-r--r--tests/common.sh.in1
-rw-r--r--tests/fetchGit.sh7
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in
index ca6df25362dc..09f2949141a4 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -21,6 +21,7 @@ export NIX_REMOTE=$NIX_REMOTE_
 unset NIX_PATH
 export TEST_HOME=$TEST_ROOT/test-home
 export HOME=$TEST_HOME
+unset XDG_CACHE_HOME
 mkdir -p $TEST_HOME
 
 export PATH=@bindir@:$PATH
diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh
index 7b13b587defb..09e4f742668e 100644
--- a/tests/fetchGit.sh
+++ b/tests/fetchGit.sh
@@ -86,3 +86,10 @@ git -C $repo commit -m 'Bla3' -a
 
 path4=$(nix eval --tarball-ttl 0 --raw "(builtins.fetchGit file://$repo).outPath")
 [[ $path2 = $path4 ]]
+
+# tarball-ttl should be ignored if we specify a rev
+echo delft > $repo/hello
+git -C $repo add hello
+git -C $repo commit -m 'Bla4'
+rev3=$(git -C $repo rev-parse HEAD)
+nix eval --tarball-ttl 3600 "(builtins.fetchGit { url = $repo; rev = \"$rev3\"; })" >/dev/null