@@ -22,14 +22,21 @@ import (
22
22
)
23
23
24
24
func init () {
25
- gosrc .RuntimeVersion = "go1.7.1 "
25
+ gosrc .RuntimeVersion = "go1.14 "
26
26
}
27
27
28
28
func TestIntegration (t * testing.T ) {
29
29
if testing .Short () {
30
30
t .Skip ("skip long integration test" )
31
31
}
32
32
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
+
33
40
tests := map [lsp.DocumentURI ]struct { // map key is rootURI
34
41
mode string
35
42
ciBlacklist bool
@@ -52,10 +59,10 @@ func TestIntegration(t *testing.T) {
52
59
"mux.go:61:38" : "type Request struct" , // stdlib
53
60
},
54
61
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
56
63
},
57
64
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" ,
59
66
},
60
67
wantXDependencies : "gorilla-mux.json" ,
61
68
wantXPackages : []string {"github.com/gorilla/mux" },
@@ -114,8 +121,8 @@ func TestIntegration(t *testing.T) {
114
121
},
115
122
wantXDependencies : "gorilla-csrf.json" ,
116
123
},
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
119
126
// retain the original rev spec in definition results.
120
127
mode : "go" ,
121
128
pinDepReposToRev : map [string ]string {
@@ -219,6 +226,8 @@ func TestIntegration(t *testing.T) {
219
226
gobuildserver .NewDepRepoVFS = func (ctx context.Context , cloneURL * url.URL , rev string , zipURLTemplate * string ) (ctxvfs.FileSystem , error ) {
220
227
if pinRev , ok := test .pinDepReposToRev [cloneURL .String ()]; ok {
221
228
rev = pinRev
229
+ } else if pinRev , ok = defaultPinDepReposToRev [cloneURL .String ()]; ok {
230
+ rev = pinRev
222
231
} else if len (rev ) != 40 && rev != gosrc .RuntimeVersion {
223
232
// It's OK to hardcode allowable Git tags
224
233
// (such as "goN.N.N") here, since we know
0 commit comments