Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: milo/appengine/settings/acl_test.go

Issue 2275123002: Milo: pRPC endpoint for getting Buildbot master data (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Renamed stuff Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « milo/appengine/frontend/static/common/rpcexplorer ('k') | milo/appengine/settings/config.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 settings 5 package settings
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 9
10 "github.com/luci/gae/impl/memory" 10 "github.com/luci/gae/impl/memory"
(...skipping 10 matching lines...) Expand all
21 21
22 func TestACL(t *testing.T) { 22 func TestACL(t *testing.T) {
23 t.Parallel() 23 t.Parallel()
24 24
25 Convey("Test Environment", t, func() { 25 Convey("Test Environment", t, func() {
26 c := memory.UseWithAppID(context.Background(), "dev~luci-milo") 26 c := memory.UseWithAppID(context.Background(), "dev~luci-milo")
27 c = gologger.StdConfig.Use(c) 27 c = gologger.StdConfig.Use(c)
28 28
29 Convey("Set up projects", func() { 29 Convey("Set up projects", func() {
30 c = lucicfg.SetImplementation(c, memcfg.New(aclConfgs)) 30 c = lucicfg.SetImplementation(c, memcfg.New(aclConfgs))
31 » » » err := update(c) 31 » » » err := Update(c)
32 So(err, ShouldBeNil) 32 So(err, ShouldBeNil)
33 33
34 Convey("Anon wants to...", func() { 34 Convey("Anon wants to...", func() {
35 c = auth.WithState(c, &authtest.FakeState{ 35 c = auth.WithState(c, &authtest.FakeState{
36 Identity: identity.AnonymousIdenti ty, 36 Identity: identity.AnonymousIdenti ty,
37 IdentityGroups: []string{"all"}, 37 IdentityGroups: []string{"all"},
38 }) 38 })
39 Convey("Read public project", func() { 39 Convey("Read public project", func() {
40 ok, err := IsAllowed(c, "opensource") 40 ok, err := IsAllowed(c, "opensource")
41 So(ok, ShouldEqual, true) 41 So(ok, ShouldEqual, true)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 ` 91 `
92 92
93 var aclConfgs = map[string]memcfg.ConfigSet{ 93 var aclConfgs = map[string]memcfg.ConfigSet{
94 "projects/secret.git": { 94 "projects/secret.git": {
95 "luci-milo.cfg": secretProjectCfg, 95 "luci-milo.cfg": secretProjectCfg,
96 }, 96 },
97 "projects/opensource.git": { 97 "projects/opensource.git": {
98 "luci-milo.cfg": publicProjectCfg, 98 "luci-milo.cfg": publicProjectCfg,
99 }, 99 },
100 } 100 }
OLDNEW
« no previous file with comments | « milo/appengine/frontend/static/common/rpcexplorer ('k') | milo/appengine/settings/config.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698