Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit ddbddde

Browse files
committed
buildserver: use go1.14 in integration tests
1 parent c2d8080 commit ddbddde

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

buildserver/integration_test.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,21 @@ import (
2222
)
2323

2424
func init() {
25-
gosrc.RuntimeVersion = "go1.7.1"
25+
gosrc.RuntimeVersion = "go1.14"
2626
}
2727

2828
func TestIntegration(t *testing.T) {
2929
if testing.Short() {
3030
t.Skip("skip long integration test")
3131
}
3232

33+
defaultPinDepReposToRev := map[string]string{
34+
"https://github.com/golang/net": "d3edc9973b7eb1fb302b0ff2c62357091cea9a30",
35+
"https://github.com/golang/crypto": "0ec3e9974c59449edd84298612e9f16fa13368e8",
36+
"https://github.com/golang/text": "06d492aade888ab8698aad35476286b7b555c961",
37+
"https://github.com/golang/sys": "c3d80250170dec19bf61949c81233cede5ddaf61",
38+
}
39+
3340
tests := map[lsp.DocumentURI]struct { // map key is rootURI
3441
mode string
3542
ciBlacklist bool
@@ -52,10 +59,10 @@ func TestIntegration(t *testing.T) {
5259
"mux.go:61:38": "type Request struct", // stdlib
5360
},
5461
wantDefinition: map[string]string{
55-
"mux.go:61:38": "git://github.com/golang/go?go1.7.1#src/net/http/request.go:76:6", // stdlib
62+
"mux.go:61:38": "git://github.com/golang/go?go1.14#src/net/http/request.go:76:6", // stdlib
5663
},
5764
wantXDefinition: map[string]string{
58-
"mux.go:61:38": "git://github.com/golang/go?go1.7.1#src/net/http/request.go:76:6 id:net/http/-/Request name:Request package:net/http packageName:http recv: vendor:false",
65+
"mux.go:61:38": "git://github.com/golang/go?go1.14#src/net/http/request.go:76:6 id:net/http/-/Request name:Request package:net/http packageName:http recv: vendor:false",
5966
},
6067
wantXDependencies: "gorilla-mux.json",
6168
wantXPackages: []string{"github.com/gorilla/mux"},
@@ -114,8 +121,8 @@ func TestIntegration(t *testing.T) {
114121
},
115122
wantXDependencies: "gorilla-csrf.json",
116123
},
117-
"git://github.com/golang/go?f75aafdf56dd90eab75cfeac8cf69358f73ba171": {
118-
// SHA is equivalent to go1.7.1 tag, but make sure we
124+
"git://github.com/golang/go?20a838ab94178c55bc4dc23ddc332fce8545a493": {
125+
// SHA is equivalent to go1.14 tag, but make sure we
119126
// retain the original rev spec in definition results.
120127
mode: "go",
121128
pinDepReposToRev: map[string]string{
@@ -219,6 +226,8 @@ func TestIntegration(t *testing.T) {
219226
gobuildserver.NewDepRepoVFS = func(ctx context.Context, cloneURL *url.URL, rev string, zipURLTemplate *string) (ctxvfs.FileSystem, error) {
220227
if pinRev, ok := test.pinDepReposToRev[cloneURL.String()]; ok {
221228
rev = pinRev
229+
} else if pinRev, ok = defaultPinDepReposToRev[cloneURL.String()]; ok {
230+
rev = pinRev
222231
} else if len(rev) != 40 && rev != gosrc.RuntimeVersion {
223232
// It's OK to hardcode allowable Git tags
224233
// (such as "goN.N.N") here, since we know

0 commit comments

Comments
 (0)