imports: adjust vendored packages test to keep working against 1.6
The prior commit fixed this test for tip (1.7) but broke it for 1.6. Change-Id: Ic39d215ac8bc60dba4b66201f1f16713b2e02d9c Reviewed-on: https://go-review.googlesource.com/21144 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
35f54f0ea0
commit
5a2fc32f44
|
|
@ -909,6 +909,11 @@ func TestFindImportVendor(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
want := "golang.org/x/net/http2/hpack"
|
||||
// Pre-1.7, we temporarily had this package under "internal" - adjust want accordingly.
|
||||
_, err = os.Stat(filepath.Join(runtime.GOROOT(), "src/vendor", want))
|
||||
if err != nil {
|
||||
want = filepath.Join("internal", want)
|
||||
}
|
||||
if got != want || rename {
|
||||
t.Errorf(`findImportGoPath("hpack", HuffmanDecode ...)=%q, %t, want %q, false`, got, rename, want)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue