From 8852e49d27b9d98194697eecd22a6f7ed1e89373 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 14 Mar 2016 20:27:22 -0700 Subject: [PATCH] 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 --- imports/fix_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/imports/fix_test.go b/imports/fix_test.go index d6852d3f20..1430c89ca1 100644 --- a/imports/fix_test.go +++ b/imports/fix_test.go @@ -905,8 +905,11 @@ func TestFindImportVendor(t *testing.T) { if err != nil { t.Fatal(err) } - if got != "golang.org/x/net/http2/hpack" || rename { - t.Errorf(`findImportGoPath("hpack", HuffmanDecode ...)=%q, %t, want "golang.org/x/net/http2/hpack", false`, got, rename) + // TODO: adjust once we use vendoring again + // 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 @@ -938,7 +941,10 @@ func TestProcessVendor(t *testing.T) { if err != nil { 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) } }