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

Side by Side Diff: server/config/authority_test.go

Issue 2580713002: Implement a server-side config service interface. (Closed)
Patch Set: Update MultiResolver interface, add test for MultiError. Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 package config
6
7 import (
8 "testing"
9
10 "github.com/luci/luci-go/server/auth"
11
12 . "github.com/smartystreets/goconvey/convey"
13 )
14
15 func TestAuthorityRPCTranslation(t *testing.T) {
16 t.Parallel()
17
18 Convey(`Testing authority RPC kind translation`, t, func() {
19 So(AsAnonymous.rpcAuthorityKind(), ShouldEqual, auth.NoAuth)
20 So(AsUser.rpcAuthorityKind(), ShouldEqual, auth.AsUser)
21 So(AsService.rpcAuthorityKind(), ShouldEqual, auth.AsSelf)
22 So(func() { Authority(-1).rpcAuthorityKind() }, ShouldPanic)
23 })
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698