diff options
author | Russ Cox <rsc@golang.org> | 2018-08-17 15:53:35 -0400 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-08-17 23:17:09 +0000 |
commit | 16a72125d53b31e2f70a6922bc398dcbba354b7a (patch) | |
tree | cc0a81474d82332149ce180df550026e36ad9cb9 /src/cmd/go/internal/modfetch/coderepo_test.go | |
parent | 0a842d55609f5deb25889f151e49744c4af3ec80 (diff) | |
download | go-16a72125d53b31e2f70a6922bc398dcbba354b7a.tar.gz go-16a72125d53b31e2f70a6922bc398dcbba354b7a.zip |
cmd/go/internal/modfetch: correct TestCodeRepo expectation
The proxy protocol was simplified to only send
(and only receive) the Path and Version fields
in the JSON blob, not Name and Short.
(Those make sense when querying a VCS repo directly,
but not when talking about extracted modules.)
So don't expect them in the test.
Fixes #27042.
Change-Id: I3daacd668126e2227dcc8e6b89ee0cf0e3c8497c
Reviewed-on: https://go-review.googlesource.com/129684
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/go/internal/modfetch/coderepo_test.go')
-rw-r--r-- | src/cmd/go/internal/modfetch/coderepo_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/go/internal/modfetch/coderepo_test.go b/src/cmd/go/internal/modfetch/coderepo_test.go index c46705105d..79b82786cb 100644 --- a/src/cmd/go/internal/modfetch/coderepo_test.go +++ b/src/cmd/go/internal/modfetch/coderepo_test.go @@ -228,10 +228,9 @@ var codeRepoTests = []struct { path: "swtch.com/testmod", rev: "v1.0.0", version: "v1.0.0", - name: "v1.0.0", - short: "v1.0.0", - time: time.Date(1972, 7, 18, 12, 34, 56, 0, time.UTC), - gomod: "module \"swtch.com/testmod\"\n", + // NO name or short - we intentionally ignore those in the proxy protocol + time: time.Date(1972, 7, 18, 12, 34, 56, 0, time.UTC), + gomod: "module \"swtch.com/testmod\"\n", }, { // redirect to googlesource |