maintner, devapp: initial integration of maintner
+ Add UpdateWithLocker method to maintner.Corpus to allow an
external locker to be passed that will be held during mutations.
+ Add OwnerID to maintner.GerritCL that returns the Gerrit user ID
of a change using its meta commits.
+ Add maintner corpus to server.
+ Add /imfeelinglucky and /imfeelinghelpful endpoints that redirect
to a random HelpWanted GitHub issue.
+ Add initial scaffold for GopherCon dashboard.
Change-Id: I2567b084f012cad5a9b4dee07e92be05088ac9d8
Reviewed-on: https://go-review.googlesource.com/47830
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/maintner/gerrit_test.go b/maintner/gerrit_test.go
index 180c519..3c76fd5 100644
--- a/maintner/gerrit_test.go
+++ b/maintner/gerrit_test.go
@@ -124,3 +124,26 @@
}
}
}
+
+func TestOwnerID(t *testing.T) {
+ cl := &GerritCL{}
+ if cl.OwnerID() != -1 {
+ t.Errorf("cl.OwnerID() = %d; want %d", cl.OwnerID(), -1)
+ }
+
+ cl = &GerritCL{
+ Meta: &GitCommit{
+ Parents: []*GitCommit{
+ &GitCommit{
+ Author: &GitPerson{
+ Str: "Rick Sanchez <137@62eb7196-b449-3ce5-99f1-c037f21e1705>",
+ },
+ },
+ },
+ },
+ }
+
+ if cl.OwnerID() != 137 {
+ t.Errorf("cl.OwnerID() = %d; want %d", cl.OwnerID(), 137)
+ }
+}