1 [short] skip
2 [!exec:hg] skip
3
4 env GO111MODULE=on
5 env GOPROXY=direct
6 env GOSUMDB=off
7 env GOMODCACHE=$WORK/modcache
8
9 # go mod download hg/hello@hash needs to check RepoSum to find pseudoversion base,
10 # which does a refreshing hg pull.
11 go mod download -x -json vcs-test.golang.org/hg/hello.hg@e483a7d9f8c9
12 stderr 'hg( .*)* pull'
13 cp stdout hellohash.json
14 stdout '"Version": "v0.0.0-20170922011414-e483a7d9f8c9"'
15 stdout '"Query": "e483a7d9f8c9"'
16 stdout '"VCS": "hg"'
17 stdout '"URL": ".*/hg/hello"'
18 stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
19 stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
20
21 # reuse go mod download vcstest/hello@hash
22 go clean -modcache
23 go mod download -reuse=hellohash.json -x -json vcs-test.golang.org/hg/hello.hg@e483a7d9f8c9
24 ! stderr 'hg( .*)* pull'
25 stdout '"Reuse": true'
26 stdout '"Query": "e483a7d9f8c9"'
27 stdout '"Version": "v0.0.0-20170922011414-e483a7d9f8c9"'
28 stdout '"VCS": "hg"'
29 stdout '"URL": ".*/hg/hello"'
30 ! stdout '"(TagPrefix|Ref)"'
31 stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
32 stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
33 ! stdout '"(Dir|Info|GoMod|Zip)"'
View as plain text