| OLD | NEW |
| 1 // Copyright 2017 The LUCI Authors. All rights reserved. | 1 // Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package buildbot | 5 package buildbot |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "testing" | 8 "testing" |
| 9 | 9 |
| 10 miloProto "github.com/luci/luci-go/common/proto/milo" | 10 miloProto "github.com/luci/luci-go/common/proto/milo" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 _, err := bip.GetBuildInfo(c, biReq.GetBuildbot(), "") | 181 _, err := bip.GetBuildInfo(c, biReq.GetBuildbot(), "") |
| 182 So(err, ShouldErrLike, "annotation stream not found") | 182 So(err, ShouldErrLike, "annotation stream not found") |
| 183 }) | 183 }) |
| 184 | 184 |
| 185 Convey("Can load a BuildBot build by query with a project hint."
, func() { | 185 Convey("Can load a BuildBot build by query with a project hint."
, func() { |
| 186 So(ds.Put(c, &build), ShouldBeNil) | 186 So(ds.Put(c, &build), ShouldBeNil) |
| 187 testClient.resp = []interface{}{ | 187 testClient.resp = []interface{}{ |
| 188 &logdog.QueryResponse{ | 188 &logdog.QueryResponse{ |
| 189 Streams: []*logdog.QueryResponse_Stream{ | 189 Streams: []*logdog.QueryResponse_Stream{ |
| 190 { | 190 { |
| 191 » » » » » » » Path: "foo/bar/+/annota
tions", | 191 » » » » » » » Path: "foo/bar/+/annotat
ions", |
| 192 » » » » » » » State: &logdog.LogStream
State{}, | |
| 193 » » » » » » » Desc: &logpb.LogStreamD
escriptor{}, | |
| 194 }, | 192 }, |
| 195 { | 193 { |
| 196 Path: "other/ignore/+/me
", | 194 Path: "other/ignore/+/me
", |
| 197 }, | 195 }, |
| 198 }, | 196 }, |
| 199 }, | 197 }, |
| 200 datagramGetResponse("testproject", "foo/bar/+/an
notations", &logdogStep), | 198 datagramGetResponse("testproject", "foo/bar/+/an
notations", &logdogStep), |
| 201 } | 199 } |
| 202 | 200 |
| 203 resp, err := bip.GetBuildInfo(c, biReq.GetBuildbot(), "t
estproject") | 201 resp, err := bip.GetBuildInfo(c, biReq.GetBuildbot(), "t
estproject") |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 }, | 277 }, |
| 280 AnnotationStream: &miloProto.LogdogStream{ | 278 AnnotationStream: &miloProto.LogdogStream{ |
| 281 Server: "example.com", | 279 Server: "example.com", |
| 282 Prefix: "bb/foo_master/bar_builder/1337"
, | 280 Prefix: "bb/foo_master/bar_builder/1337"
, |
| 283 Name: "annotations", | 281 Name: "annotations", |
| 284 }, | 282 }, |
| 285 }) | 283 }) |
| 286 }) | 284 }) |
| 287 }) | 285 }) |
| 288 } | 286 } |
| OLD | NEW |