| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 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 "encoding/json" | 8 "encoding/json" |
| 9 "flag" | 9 "flag" |
| 10 "fmt" | 10 "fmt" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }) | 76 }) |
| 77 } | 77 } |
| 78 | 78 |
| 79 Convey(`Disallow anonomyous users from accessing internal builds
`, func() { | 79 Convey(`Disallow anonomyous users from accessing internal builds
`, func() { |
| 80 ds.Put(c, &buildbotBuild{ | 80 ds.Put(c, &buildbotBuild{ |
| 81 Master: "fake", | 81 Master: "fake", |
| 82 Buildername: "fake", | 82 Buildername: "fake", |
| 83 Number: 1, | 83 Number: 1, |
| 84 Internal: true, | 84 Internal: true, |
| 85 }) | 85 }) |
| 86 » » » b, err := getBuild(c, "fake", "fake", 1) | 86 » » » _, err := getBuild(c, "fake", "fake", 1) |
| 87 » » » So(b, ShouldBeNil) | |
| 88 So(err, ShouldResemble, miloerror.Error{ | 87 So(err, ShouldResemble, miloerror.Error{ |
| 89 Message: "Cannot fetch project buildbot-internal
:\ndatastore: no such entity", | 88 Message: "Cannot fetch project buildbot-internal
:\ndatastore: no such entity", |
| 90 Code: 500, | 89 Code: 500, |
| 91 }) | 90 }) |
| 92 }) | 91 }) |
| 93 }) | 92 }) |
| 94 } | 93 } |
| OLD | NEW |