...
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/sub/v9 should also fail, 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/sub/v9@latest
12cp stdout hellosubv9.json
13stdout '"Version": "latest"'
14stdout '"Error":.*no matching versions'
15! stdout '"TagPrefix"'
16stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
17stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
18
19# reuse go mod download vcstest/hello/sub/v9 error result
20go clean -modcache
21! go mod download -reuse=hellosubv9.json -x -json vcs-test.golang.org/hg/hello.hg/sub/v9@latest
22! stderr 'hg( .*)* pull'
23stdout '"Reuse": true'
24stdout '"Error":.*no matching versions'
25! stdout '"TagPrefix"'
26stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
27stdout '"Ref": "tip"'
28stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
29! stdout '"(Dir|Info|GoMod|Zip)"'View as plain text