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

Unified Diff: server/auth/authdb/snapshot_test.go

Issue 2873113002: auth: Remove "shared" aka "global" secrets. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/auth/authdb/snapshot.go ('k') | server/auth/authtest/db.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/auth/authdb/snapshot_test.go
diff --git a/server/auth/authdb/snapshot_test.go b/server/auth/authdb/snapshot_test.go
index 171f0c68c2b716684734c538e2f362208736ced5..a398acff695b1c76348038b26db95c5052baca9d 100644
--- a/server/auth/authdb/snapshot_test.go
+++ b/server/auth/authdb/snapshot_test.go
@@ -17,7 +17,6 @@ import (
"github.com/luci/luci-go/server/auth/service/protocol"
"github.com/luci/luci-go/server/auth/signing"
"github.com/luci/luci-go/server/auth/signing/signingtest"
- "github.com/luci/luci-go/server/secrets"
. "github.com/smartystreets/goconvey/convey"
)
@@ -100,47 +99,6 @@ func TestSnapshotDB(t *testing.T) {
So(call("user:abc@example.com", "via glob", "direct"), ShouldBeTrue)
})
- Convey("SharedSecrets works", t, func() {
- c := context.Background()
- db, err := NewSnapshotDB(&protocol.AuthDB{
- Secrets: []*protocol.AuthSecret{
- {
- Name: strPtr("secret-1"),
- Values: [][]byte{
- []byte("current"),
- },
- },
- {
- Name: strPtr("secret-2"),
- Values: [][]byte{
- []byte("current"),
- []byte("prev1"),
- []byte("prev2"),
- },
- },
- {
- Name: strPtr("empty"),
- },
- },
- }, "http://auth-service", 1234)
- So(err, ShouldBeNil)
-
- s, err := db.SharedSecrets(c)
- So(err, ShouldBeNil)
- So(s, ShouldResemble, secrets.StaticStore{
- "secret-1": {
- Current: secrets.NamedBlob{Blob: []byte("current")},
- },
- "secret-2": {
- Current: secrets.NamedBlob{Blob: []byte("current")},
- Previous: []secrets.NamedBlob{
- {Blob: []byte("prev1")},
- {Blob: []byte("prev2")},
- },
- },
- })
- })
-
Convey("GetCertificates works", t, func(c C) {
db, err := NewSnapshotDB(&protocol.AuthDB{
OauthClientId: strPtr("primary-client-id"),
« no previous file with comments | « server/auth/authdb/snapshot.go ('k') | server/auth/authtest/db.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698