aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/util_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-12-04 09:00:28 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-12-04 09:00:28 +0100
commit96ca35f4c7ac6fecc3f129eb340cfd29f18cfdf1 (patch)
treef4c830e9674623545f6da3401e47222a34677335 /dashboard/app/util_test.go
parent48359b97770f794600de4b58aab8aa069ee993db (diff)
dashboard/app: show info about duplicates and similar bugs
Show info about duplicates and similar bugs in other kernels on the bug page.
Diffstat (limited to 'dashboard/app/util_test.go')
-rw-r--r--dashboard/app/util_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/dashboard/app/util_test.go b/dashboard/app/util_test.go
index 5c868b1b5..c9b8f8688 100644
--- a/dashboard/app/util_test.go
+++ b/dashboard/app/util_test.go
@@ -28,6 +28,7 @@ import (
"golang.org/x/net/context"
"google.golang.org/appengine"
"google.golang.org/appengine/aetest"
+ "google.golang.org/appengine/datastore"
aemail "google.golang.org/appengine/mail"
"google.golang.org/appengine/user"
)
@@ -93,8 +94,16 @@ func caller(skip int) string {
func (c *Ctx) Close() {
if !c.t.Failed() {
- // Ensure that we can render bugs in the final test state.
+ // Ensure that we can render main page and all bugs in the final test state.
c.expectOK(c.GET("/"))
+ var bugs []*Bug
+ keys, err := datastore.NewQuery("Bug").GetAll(c.ctx, &bugs)
+ if err != nil {
+ c.t.Errorf("ERROR: failed to query bugs: %v", err)
+ }
+ for _, key := range keys {
+ c.expectOK(c.GET(fmt.Sprintf("/bug?id=%v", key.StringID())))
+ }
c.expectOK(c.GET("/email_poll"))
for len(c.emailSink) != 0 {
c.t.Errorf("ERROR: leftover email: %v", (<-c.emailSink).Body)