blob: bfbb9d9b636c822baa7a282ed258f201326a5f88 [file] [edit]
[short] skip
[!exec:hg] skip
env GO111MODULE=on
env GOPROXY=direct
env GOSUMDB=off
env GOMODCACHE=$WORK/modcache
# go mod download of a bunch of these should fail (some are invalid) but write good JSON for later
! go mod download -json vcs-test.golang.org/hg/hello.hg@latest vcs-test.golang.org/hg/hello.hg/v9@latest vcs-test.golang.org/hg/hello.hg/sub/v9@latest vcs-test.golang.org/hg/tagtests.hg@latest vcs-test.golang.org/hg/tagtests.hg@v0.2.2 vcs-test.golang.org/hg/tagtests.hg@default
cp stdout all.json
# reuse go mod download vcstest/tagtests@default result again with all.json
go clean -modcache
go mod download -reuse=all.json -x -json vcs-test.golang.org/hg/tagtests.hg@default
! stderr 'hg( .*)* pull'
stdout '"Reuse": true'
stdout '"Version": "v0.2.3-0.20190509225625-8d0b18b816df"'
stdout '"Query": "default"'
stdout '"VCS": "hg"'
stdout '"URL": ".*/hg/tagtests"'
! stdout '"TagPrefix"'
stdout '"RepoSum": "r1:8dnv906Aq1vb9YpNl9pslfva0VfG9enKb6O6NWs0xF0="'
stdout '"Ref": "default"'
stdout '"Hash": "8d0b18b816df5e9c564761b405b1d7949c24ee6b"'
! stdout '"(Dir|Info|GoMod|Zip)"'
# reuse the bulk results with all.json
go clean -modcache
! go mod download -reuse=all.json -json vcs-test.golang.org/hg/hello.hg@latest vcs-test.golang.org/hg/hello.hg/v9@latest vcs-test.golang.org/hg/hello.hg/sub/v9@latest vcs-test.golang.org/hg/tagtests.hg@latest vcs-test.golang.org/hg/tagtests.hg@v0.2.2 vcs-test.golang.org/hg/tagtests.hg@default
! stderr 'hg( .*)* pull'
stdout '"Reuse": true'
! stdout '"(Dir|Info|GoMod|Zip)"'