1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:14:40 -07:00

imports: adjust tests to fix build

These changes will need to be reverted once we use
vendoring in the stdlib again, but it's trivial to
do so when the time comes.

TBR=adonovan

Fixes #14823.

Change-Id: I2173c48d5466874492affc679332f6484bf96592
Reviewed-on: https://go-review.googlesource.com/20695
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Robert Griesemer 2016-03-14 20:27:22 -07:00
parent cac5711748
commit 8852e49d27

View File

@ -905,8 +905,11 @@ func TestFindImportVendor(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
if got != "golang.org/x/net/http2/hpack" || rename { // TODO: adjust once we use vendoring again
t.Errorf(`findImportGoPath("hpack", HuffmanDecode ...)=%q, %t, want "golang.org/x/net/http2/hpack", false`, got, rename) // want := "golang.org/x/net/http2/hpack"
want := "internal/golang.org/x/net/http2/hpack"
if got != want || rename {
t.Errorf(`findImportGoPath("hpack", HuffmanDecode ...)=%q, %t, want %q, false`, got, rename, want)
} }
// should not be able to use vendor from outside that tree // should not be able to use vendor from outside that tree
@ -938,7 +941,10 @@ func TestProcessVendor(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
if !bytes.Contains(out, []byte("\"golang.org/x/net/http2/hpack\"")) { // TODO: adjust once we use vendoring again
// want := "golang.org/x/net/http2/hpack"
want := "internal/golang.org/x/net/http2/hpack"
if !bytes.Contains(out, []byte(want)) {
t.Fatalf("Process(%q) did not add expected hpack import:\n%s", target, out) t.Fatalf("Process(%q) did not add expected hpack import:\n%s", target, out)
} }
} }