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

Unified Diff: tokenserver/appengine/utils/identityset/identityset_test.go

Issue 2413683004: token-server: Delegation config import, validation and evaluation. (Closed)
Patch Set: also check validity_duration Created 4 years, 2 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 | « tokenserver/appengine/utils/identityset/identityset.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tokenserver/appengine/utils/identityset/identityset_test.go
diff --git a/tokenserver/appengine/utils/identityset/identityset_test.go b/tokenserver/appengine/utils/identityset/identityset_test.go
index f4e87ca06d4e24a0a3e765d3366e7e7846c9ede2..e59f4e70d5ba788924b2462551fd807d2b18877a 100644
--- a/tokenserver/appengine/utils/identityset/identityset_test.go
+++ b/tokenserver/appengine/utils/identityset/identityset_test.go
@@ -23,6 +23,7 @@ func TestFromStrings(t *testing.T) {
So(err, ShouldBeNil)
So(s, ShouldResemble, &Set{})
So(s.IsEmpty(), ShouldBeTrue)
+ So(s.ToStrings(), ShouldResemble, []string{})
})
Convey("Universal", t, func() {
@@ -30,6 +31,7 @@ func TestFromStrings(t *testing.T) {
So(err, ShouldBeNil)
So(s, ShouldResemble, &Set{All: true})
So(s.IsEmpty(), ShouldBeFalse)
+ So(s.ToStrings(), ShouldResemble, []string{"*"})
})
Convey("Normal", t, func() {
@@ -54,6 +56,12 @@ func TestFromStrings(t *testing.T) {
},
})
So(s.IsEmpty(), ShouldBeFalse)
+ So(s.ToStrings(), ShouldResemble, []string{
+ "group:abc",
+ "group:def",
+ "user:abc@example.com",
+ "user:def@example.com",
+ })
})
Convey("Bad group entry", t, func() {
« no previous file with comments | « tokenserver/appengine/utils/identityset/identityset.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698