OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package coordinatorTest | 5 package coordinatorTest |
6 | 6 |
7 import ( | 7 import ( |
8 "fmt" | 8 "fmt" |
9 "strings" | 9 "strings" |
10 "time" | 10 "time" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 }, | 276 }, |
277 } | 277 } |
278 c = coordinator.WithServices(c, &e.Services) | 278 c = coordinator.WithServices(c, &e.Services) |
279 | 279 |
280 return c, &e | 280 return c, &e |
281 } | 281 } |
282 | 282 |
283 // WithProjectNamespace runs f in proj's namespace, bypassing authentication | 283 // WithProjectNamespace runs f in proj's namespace, bypassing authentication |
284 // checks. | 284 // checks. |
285 func WithProjectNamespace(c context.Context, proj luciConfig.ProjectName, f func
(context.Context)) { | 285 func WithProjectNamespace(c context.Context, proj luciConfig.ProjectName, f func
(context.Context)) { |
286 » if err := coordinator.WithProjectNamespaceNoAuth(&c, proj); err != nil { | 286 » if err := coordinator.WithProjectNamespace(&c, proj, coordinator.Namespa
ceAccessNoAuth); err != nil { |
287 panic(err) | 287 panic(err) |
288 } | 288 } |
289 f(c) | 289 f(c) |
290 } | 290 } |
OLD | NEW |