OLD | NEW |
(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 } |
OLD | NEW |