| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. | 1 // Copyright 2015 The LUCI Authors. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // needed for everything else | 50 // needed for everything else |
| 51 c = infoS.Set(c, Info()) | 51 c = infoS.Set(c, Info()) |
| 52 | 52 |
| 53 Convey("Info", func() { | 53 Convey("Info", func() { |
| 54 So(infoS.Raw(c), ShouldNotBeNil) | 54 So(infoS.Raw(c), ShouldNotBeNil) |
| 55 So(func() { | 55 So(func() { |
| 56 defer p() | 56 defer p() |
| 57 infoS.Raw(c).Datacenter() | 57 infoS.Raw(c).Datacenter() |
| 58 }, ShouldPanicWith, "dummy: method Info.Datacenter is no
t implemented") | 58 }, ShouldPanicWith, "dummy: method Info.Datacenter is no
t implemented") |
| 59 |
| 60 Convey("ModuleHostname", func() { |
| 61 host, err := infoS.ModuleHostname(c, "", "", "") |
| 62 So(err, ShouldBeNil) |
| 63 So(host, ShouldEqual, "version.module.dummy-appi
d.example.com") |
| 64 |
| 65 host, err = infoS.ModuleHostname(c, "wut", "10",
"") |
| 66 So(err, ShouldBeNil) |
| 67 So(host, ShouldEqual, "10.wut.dummy-appid.exampl
e.com") |
| 68 }) |
| 59 }) | 69 }) |
| 60 | 70 |
| 61 Convey("Datastore", func() { | 71 Convey("Datastore", func() { |
| 62 c = dsS.SetRaw(c, Datastore()) | 72 c = dsS.SetRaw(c, Datastore()) |
| 63 So(dsS.Raw(c), ShouldNotBeNil) | 73 So(dsS.Raw(c), ShouldNotBeNil) |
| 64 So(func() { | 74 So(func() { |
| 65 defer p() | 75 defer p() |
| 66 _, _ = dsS.Raw(c).DecodeCursor("wut") | 76 _, _ = dsS.Raw(c).DecodeCursor("wut") |
| 67 }, ShouldPanicWith, "dummy: method Datastore.DecodeCurso
r is not implemented") | 77 }, ShouldPanicWith, "dummy: method Datastore.DecodeCurso
r is not implemented") |
| 68 }) | 78 }) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 Convey("Module", func() { | 116 Convey("Module", func() { |
| 107 c = modS.Set(c, Module()) | 117 c = modS.Set(c, Module()) |
| 108 So(modS.Raw(c), ShouldNotBeNil) | 118 So(modS.Raw(c), ShouldNotBeNil) |
| 109 So(func() { | 119 So(func() { |
| 110 defer p() | 120 defer p() |
| 111 modS.List(c) | 121 modS.List(c) |
| 112 }, ShouldPanicWith, "dummy: method Module.List is not im
plemented") | 122 }, ShouldPanicWith, "dummy: method Module.List is not im
plemented") |
| 113 }) | 123 }) |
| 114 }) | 124 }) |
| 115 } | 125 } |
| OLD | NEW |