Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: go/src/infra/appengine/test-results/frontend/builders_test.go

Issue 2251613002: test-results: builders and builderstate: bug fixes, tests (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@cl-ing_upload
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 package frontend 1 package frontend
2 2
3 import ( 3 import (
4 "infra/appengine/test-results/buildextract" 4 "infra/appengine/test-results/buildextract"
5 "infra/appengine/test-results/masters" 5 "infra/appengine/test-results/masters"
6 "net/http" 6 "net/http"
7 "testing" 7 "testing"
8 8
9 "golang.org/x/net/context" 9 "golang.org/x/net/context"
10 10
11 . "github.com/smartystreets/goconvey/convey" 11 . "github.com/smartystreets/goconvey/convey"
12 ) 12 )
13 13
14 func TestCleanTestType(t *testing.T) {
15 t.Parallel()
16
17 Convey("cleanTestType", t, func() {
18 type testCase struct {
19 input, output string
20 }
21 testCases := []testCase{
22 {"base_unittests", "base_unittests"},
23 {"base_unittests on Windows XP", "base_unittests"},
24 {"base_unittests on Windows XP (with patch)", "base_unit tests (with patch)"},
25 {"base_unittests on ATI GPU on Windows (with patch) on W indows", "base_unittests (with patch)"},
26 {"base_unittests (ATI GPU) on Windows (with patch) on Wi ndows", "base_unittests (with patch)"},
27 {"base_unittests on ATI GPU on Windows (without patch) o n Windows", "base_unittests"},
28 {"Instrumentation test content_shell_test_apk (with patc h)", "content_shell_test_apk (with patch)"},
29 }
30 for _, tc := range testCases {
31 So(cleanTestType(tc.input), ShouldEqual, tc.output)
32 }
33 })
34 }
35
14 func TestBuilders(t *testing.T) { 36 func TestBuilders(t *testing.T) {
37 t.Parallel()
38
15 Convey("builders", t, func() { 39 Convey("builders", t, func() {
16 Convey("getBuilderData", func() { 40 Convey("getBuilderData", func() {
17 Convey("normal", func() { 41 Convey("normal", func() {
18 tClient := &buildextract.TestingClient{ 42 tClient := &buildextract.TestingClient{
19 M: map[string][]byte{ 43 M: map[string][]byte{
20 "chromium.webkit": []byte(`{ 44 "chromium.webkit": []byte(`{
21 "builders": { 45 "builders": {
22 "WebKit Win": null, 46 "WebKit Win": null,
23 "WebKit Linux": null, 47 "WebKit Linux": null,
24 "WebKit Mac": null, 48 "WebKit Mac": null,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 163
140 _, err = getBuilderData(context.Background(), [] *masters.Master{{ 164 _, err = getBuilderData(context.Background(), [] *masters.Master{{
141 Identifier: "chromium.gpu", 165 Identifier: "chromium.gpu",
142 Name: "ChromiumGPU", 166 Name: "ChromiumGPU",
143 }}, tClient) 167 }}, tClient)
144 So(err, ShouldBeNil) 168 So(err, ShouldBeNil)
145 }) 169 })
146 }) 170 })
147 }) 171 })
148 } 172 }
OLDNEW
« no previous file with comments | « go/src/infra/appengine/test-results/frontend/builders.go ('k') | go/src/infra/appengine/test-results/frontend/builderstate.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698