status-go/server/pairing/certs_test.go

29 lines
511 B
Go
Raw Permalink Normal View History

2023-03-21 12:36:34 +00:00
package pairing
import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/status-im/status-go/server/servertest"
)
func TestCerts(t *testing.T) {
suite.Run(t, new(CertsSuite))
}
type CertsSuite struct {
suite.Suite
servertest.TestKeyComponents
servertest.TestCertComponents
}
func (s *CertsSuite) SetupSuite() {
s.SetupKeyComponents(s.T())
s.SetupCertComponents(s.T())
}
func (s *CertsSuite) Test_makeSerialNumberFromKey() {
s.Require().Zero(makeSerialNumberFromKey(s.PK).Cmp(s.SN))
}