Skip to content

Commit 38d0631

Browse files
committed
gopls/internal/test: update hover test to be tolerant proxy changes
In general, we should avoid using a hard-coded go.sum file when it is not important to the test. Update a hover test under discussion to avoid such a hard-coded file. Change-Id: Ib4241d29398572ac38c8d1b6e3344fc49dc397e2 Reviewed-on: https://go-review.googlesource.com/c/tools/+/643717 Reviewed-by: Peter Weinberger <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent b0164fc commit 38d0631

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

gopls/internal/test/integration/misc/hover_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestHoverUnexported(t *testing.T) {
2121
-- golang.org/x/[email protected]/go.mod --
2222
module golang.org/x/structs
2323
24-
go 1.12
24+
go 1.21
2525
2626
-- golang.org/x/[email protected]/types.go --
2727
package structs
@@ -40,12 +40,9 @@ func printMixed(m Mixed) {
4040
-- go.mod --
4141
module mod.com
4242
43-
go 1.12
43+
go 1.21
4444
4545
require golang.org/x/structs v1.0.0
46-
-- go.sum --
47-
golang.org/x/structs v1.0.0 h1:Ito/a7hBYZaNKShFrZKjfBA/SIPvmBrcPCBWPx5QeKk=
48-
golang.org/x/structs v1.0.0/go.mod h1:47gkSIdo5AaQaWJS0upVORsxfEr1LL1MWv9dmYF3iq4=
4946
-- main.go --
5047
package main
5148
@@ -60,6 +57,7 @@ func main() {
6057
// TODO: use a nested workspace folder here.
6158
WithOptions(
6259
ProxyFiles(proxy),
60+
WriteGoSum("."),
6361
).Run(t, mod, func(t *testing.T, env *Env) {
6462
env.OpenFile("main.go")
6563
mixedLoc := env.RegexpSearch("main.go", "Mixed")

0 commit comments

Comments
 (0)