File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010 "time"
1111
1212 "code.gitea.io/gitea/modules/timeutil"
13+ "github.com/keybase/go-crypto/openpgp"
1314
1415 "github.com/stretchr/testify/assert"
1516)
@@ -407,8 +408,14 @@ FkzJRllII58iAA==
407408 ekey , err := checkArmoredGPGKeyString (testIssue6778 )
408409 assert .NoError (t , err )
409410
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
410415 for _ , ident := range ekey .Identities {
416+ identities = append (identities , ident )
411417 email := strings .ToLower (strings .TrimSpace (ident .UserId .Email ))
412418 t .Logf ("DEBUG: %s" , email )
413419 }
420+ assert .Contains (t , identities [0 ].Name , "Alden Peeters <alden.peeters@" ) //Should not output the revoked uid
414421}
You can’t perform that action at this time.
0 commit comments