| 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 | 9 |
| 10 "github.com/golang/protobuf/proto" | 10 "github.com/golang/protobuf/proto" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 }, | 243 }, |
| 244 } | 244 } |
| 245 c = coordinator.WithServices(c, &e.Services) | 245 c = coordinator.WithServices(c, &e.Services) |
| 246 | 246 |
| 247 return c, &e | 247 return c, &e |
| 248 } | 248 } |
| 249 | 249 |
| 250 // WithProjectNamespace runs f in proj's namespace, bypassing authentication | 250 // WithProjectNamespace runs f in proj's namespace, bypassing authentication |
| 251 // checks. | 251 // checks. |
| 252 func WithProjectNamespace(c context.Context, proj luciConfig.ProjectName, f func
(context.Context)) { | 252 func WithProjectNamespace(c context.Context, proj luciConfig.ProjectName, f func
(context.Context)) { |
| 253 » if err := coordinator.WithProjectNamespaceNoAuth(&c, proj); err != nil { | 253 » if err := coordinator.WithProjectNamespace(&c, proj, coordinator.Namespa
ceAccessNoAuth); err != nil { |
| 254 panic(err) | 254 panic(err) |
| 255 } | 255 } |
| 256 f(c) | 256 f(c) |
| 257 } | 257 } |
| OLD | NEW |