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

Side by Side Diff: go/src/infra/appengine/test-results/model/masters_test.go

Issue 2234353002: test-results: package model: Add full_result.go and tests (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Improve coverage 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
(Empty)
1 package model
2
3 import (
4 "testing"
5
6 . "github.com/smartystreets/goconvey/convey"
7 )
8
9 func TestMasters(t *testing.T) {
10 t.Parallel()
11
12 Convey("Masters", t, func() {
13 Convey("Known Masters", func() {
14 Convey("ByName", func() {
15 Convey("existing", func() {
16 So(MasterByName("TryServerChromiumMac"), ShouldResemble, &Master{
17 Name: "TryServerChromiumMa c",
18 Identifier: "tryserver.chromium. mac",
19 Groups: []string{"Unused"},
20 })
21 })
22
23 Convey("not existing", func() {
24 So(MasterByName("FooBar"), ShouldBeNil)
25 So(MasterByName("tryserver.chromium.mac" ), ShouldBeNil)
26 })
27 })
28
29 Convey("ByIdentifier", func() {
30 Convey("existing", func() {
31 So(MasterByIdentifier("tryserver.chromiu m.linux"), ShouldResemble, &Master{
32 Name: "TryServerChromiumLi nux",
33 Identifier: "tryserver.chromium. linux",
34 Groups: []string{"Unused"},
35 })
36 })
37
38 Convey("not existing", func() {
39 So(MasterByIdentifier("foo.bar"), Should BeNil)
40 So(MasterByIdentifier("TryServerChromium Linux"), ShouldBeNil)
41 })
42 })
43 })
44 })
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698