mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
These unit-tests cover operations via both PGP providers: built-in `openpgp` and external `gpg`. Next step is to run these tests for gpg1 & gpg2 as separate entities.
38 lines
667 B
Go
38 lines
667 B
Go
package pgp
|
|
|
|
import (
|
|
. "gopkg.in/check.v1"
|
|
)
|
|
|
|
type GoVerifierSuite struct {
|
|
VerifierSuite
|
|
}
|
|
|
|
var _ = Suite(&GoVerifierSuite{})
|
|
|
|
func (s *GoVerifierSuite) SetUpTest(c *C) {
|
|
s.verifier = &GoVerifier{}
|
|
s.verifier.AddKeyring("./trusted.gpg")
|
|
|
|
c.Assert(s.verifier.InitKeyring(), IsNil)
|
|
}
|
|
|
|
type GoSignerSuite struct {
|
|
SignerSuite
|
|
}
|
|
|
|
var _ = Suite(&GoSignerSuite{})
|
|
|
|
func (s *GoSignerSuite) SetUpTest(c *C) {
|
|
s.signer = &GoSigner{}
|
|
s.signer.SetBatch(true)
|
|
|
|
s.verifier = &GoVerifier{}
|
|
s.verifier.AddKeyring("./keyrings/aptly.pub")
|
|
s.verifier.AddKeyring("./keyrings/aptly_passphrase.pub")
|
|
|
|
c.Assert(s.verifier.InitKeyring(), IsNil)
|
|
|
|
s.SignerSuite.SetUpTest(c)
|
|
}
|