...
1[short] skip
2[!exec:hg] skip
3
4env GO111MODULE=on
5env GOPROXY=direct
6env GOSUMDB=off
7env GOMODCACHE=$WORK/modcache
8
9# go mod download vcstest/hello/v9 should fail, still print origin info
10# hg uses RepoSum instead of TagSum to describe failure condition.
11! go mod download -x -json vcs-test.golang.org/hg/hello.hg/v9@latest
12cp stdout hellov9.json
13stdout '"Version": "latest"'
14stdout '"Error":.*no matching versions'
15! stdout '"TagPrefix"'
16! stdout '"TagSum"'
17stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
18stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
19
20# reuse go mod download vcstest/hello/v9 error result
21go clean -modcache
22! go mod download -reuse=hellov9.json -x -json vcs-test.golang.org/hg/hello.hg/v9@latest
23! stderr 'hg( .*)* pull'
24stdout '"Reuse": true'
25stdout '"Error":.*no matching versions'
26! stdout '"TagPrefix"'
27stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
28stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
29! stdout '"(Dir|Info|GoMod|Zip)"'View as plain text