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 <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Brad Fitzpatrick 2020-01-06 17:04:22 +00:00
Родитель 17a7d8724f
Коммит 454ff62def
2 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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},
}