fetchGit: Add a test

This commit is contained in:
Eelco Dolstra 2017-11-03 13:33:50 +01:00
parent 0e77aa3982
commit 4dee01da7c
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
6 changed files with 90 additions and 2 deletions

View file

@ -42,7 +42,7 @@ path2=$(nix eval --raw "(builtins.fetchMercurial file://$repo).outPath")
[[ $(nix eval --raw "(builtins.fetchMercurial file://$repo).rev") = $rev2 ]]
# But with TTL 0, it should fail.
(! nix eval --tarball-ttl 0 --raw "(builtins.fetchMercurial file://$repo)")
(! nix eval --tarball-ttl 0 "(builtins.fetchMercurial file://$repo)")
# Fetching with a explicit hash should succeed.
path2=$(nix eval --tarball-ttl 0 --raw "(builtins.fetchMercurial { url = file://$repo; rev = \"$rev2\"; }).outPath")