From 454ff62def6324f84f9fbb268ba223e22180632e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 6 Jan 2020 17:04:22 +0000 Subject: [PATCH] devapp/owners: add wasm, oauth2 owners, quiet log spam in test Change-Id: Ief151fa9e23e08505200b32ee0184b526b3ad233 Reviewed-on: https://go-review.googlesource.com/c/build/+/213441 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Dmitri Shuralyov --- devapp/owners/owners_test.go | 12 ++++++++++++ devapp/owners/table.go | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/devapp/owners/owners_test.go b/devapp/owners/owners_test.go index 16afeb37..582d969d 100644 --- a/devapp/owners/owners_test.go +++ b/devapp/owners/owners_test.go @@ -7,8 +7,11 @@ package owners import ( "bytes" "encoding/json" + "io" + "log" "net/http" "net/http/httptest" + "os" "testing" "github.com/google/go-cmp/cmp" @@ -161,6 +164,15 @@ func TestIndex(t *testing.T) { } func TestBadRequest(t *testing.T) { + defer func(old io.Writer) { log.SetOutput(old) }(os.Stderr /* TODO: use log.Writer() when Go 1.14 is out */) + var logBuf bytes.Buffer + log.SetOutput(&logBuf) + defer func() { + if t.Failed() { + t.Logf("Log output: %s", &logBuf) + } + }() + req, err := http.NewRequest("POST", "/owners", bytes.NewBufferString("malformed json")) if err != nil { t.Fatalf("http.NewRequest: %v", err) diff --git a/devapp/owners/table.go b/devapp/owners/table.go index f2a1240e..a2e1c313 100644 --- a/devapp/owners/table.go +++ b/devapp/owners/table.go @@ -59,6 +59,7 @@ var ( mpvl = gh("mpvl") mvdan = gh("mvdan") mwhudson = gh("mwhudson") + neelance = gh("neelance") r = gh("robpike") rsc = gh("rsc") rstambler = gh("stamblerre") @@ -109,6 +110,11 @@ var entries = map[string]*Entry{ Secondary: []Owner{thanm, cherryyz}, }, + "go/misc/wasm": wasmOwners, + "go/cmd/compile/internal/wasm": wasmOwners, + "go/cmd/internal/obj/wasm": wasmOwners, + "go/cmd/link/internal/wasm": wasmOwners, + "go/src/archive/tar": { Primary: []Owner{joetsai}, }, @@ -618,6 +624,11 @@ var entries = map[string]*Entry{ Primary: []Owner{mikioh, iant}, }, + "oauth2": { + Primary: []Owner{bradfitz}, + Secondary: []Owner{jbd, cbro}, + }, + "review": { Secondary: []Owner{josharian, kevinburke}, }, @@ -681,3 +692,7 @@ var entries = map[string]*Entry{ Secondary: []Owner{cnoellekb, andybons}, }, } + +var wasmOwners = &Entry{ + Primary: []Owner{neelance, cherryyz}, +}