File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"time"
11
11
12
12
"code.gitea.io/gitea/modules/timeutil"
13
+ "github.com/keybase/go-crypto/openpgp"
13
14
14
15
"github.com/stretchr/testify/assert"
15
16
)
@@ -407,8 +408,14 @@ FkzJRllII58iAA==
407
408
ekey , err := checkArmoredGPGKeyString (testIssue6778 )
408
409
assert .NoError (t , err )
409
410
411
+ assert .Equal (t , 1 , len (ekey .Identities )) //Should not output the revoked uid
412
+
413
+ //Inspired from https://github.com/keybase/go-crypto/blob/master/openpgp/keys_test.go#L519
414
+ var identities []* openpgp.Identity
410
415
for _ , ident := range ekey .Identities {
416
+ identities = append (identities , ident )
411
417
email := strings .ToLower (strings .TrimSpace (ident .UserId .Email ))
412
418
t .Logf ("DEBUG: %s" , email )
413
419
}
420
+ assert .Contains (t , identities [0 ].Name , "Alden Peeters <alden.peeters@" ) //Should not output the revoked uid
414
421
}
You can’t perform that action at this time.
0 commit comments