Documentation ¶
Index ¶
- Variables
- func AssertErrorContains(tb testing.TB, err error, contains string) bool
- func AssertErrorPrefix(tb testing.TB, err error, prefix string) bool
- func AssertGRPCStatus(tb testing.TB, err error, code codes.Code, message string) bool
- func AssertGRPCStatusContains(tb testing.TB, err error, code codes.Code, contains string, ...) bool
- func AssertGRPCStatusHasPrefix(tb testing.TB, err error, code codes.Code, prefix string) bool
- func AssertLastLogs(t *testing.T, entries []*logrus.Entry, expected []LogEntry)
- func AssertLogs(t *testing.T, entries []*logrus.Entry, expected []LogEntry)
- func AssertLogsAnyOrder(t *testing.T, entries []*logrus.Entry, expected []LogEntry)
- func AssertLogsContainEntries(t *testing.T, entries []*logrus.Entry, expectedEntries []LogEntry)
- func AssertProtoEqual(tb testing.TB, expected, actual proto.Message, msgAndArgs ...interface{}) bool
- func AssertProtoListEqual(tb testing.TB, expected, actual interface{}) bool
- func CreateCertificate(tb testing.TB, tmpl, parent *x509.Certificate, pub, priv interface{}) *x509.Certificate
- func NewAPIServer(t *testing.T, registerFn func(s *grpc.Server), ...) (*grpc.ClientConn, func())
- func NewAPIServerWithMiddleware(t *testing.T, registerFn func(s *grpc.Server), server *grpc.Server) (*grpc.ClientConn, func())
- func RequireErrorContains(tb testing.TB, err error, contains string)
- func RequireErrorPrefix(tb testing.TB, err error, prefix string)
- func RequireGRPCStatus(tb testing.TB, err error, code codes.Code, message string)
- func RequireGRPCStatusContains(tb testing.TB, err error, code codes.Code, contains string, ...)
- func RequireGRPCStatusHasPrefix(tb testing.TB, err error, code codes.Code, prefix string)
- func RequireProtoEqual(tb testing.TB, expected, actual proto.Message, msgAndArgs ...interface{})
- func RequireProtoListEqual(tb testing.TB, expected, actual interface{})
- func Run(t *testing.T, s suite.TestingSuite)
- func SelfSignCertificate(tb testing.TB, tmpl *x509.Certificate) (*x509.Certificate, crypto.Signer)
- func SelfSignCertificateWithKey(tb testing.TB, tmpl *x509.Certificate, key crypto.Signer) *x509.Certificate
- func ServeGRPCServerOnListener(t *testing.T, server *grpc.Server, listener net.Listener)
- func ServeGRPCServerOnSocket(t *testing.T, server *grpc.Server, socketPath string)
- func ServeGRPCServerOnTempSocket(t *testing.T, server *grpc.Server) string
- func StartGRPCSocketServer(t *testing.T, socketPath string, registerFn func(s *grpc.Server))
- func StartGRPCSocketServerOnTempSocket(t *testing.T, registerFn func(s *grpc.Server)) string
- func StartWorkloadAPIOnSocket(t *testing.T, socketPath string, server workload.SpiffeWorkloadAPIServer)
- func StartWorkloadAPIOnTempSocket(t *testing.T, server workload.SpiffeWorkloadAPIServer) string
- func TempDir(tb testing.TB) string
- type LogEntry
- type Suite
- func (s *Suite) AssertErrorContains(err error, contains string) bool
- func (s *Suite) AssertGRPCStatus(err error, code codes.Code, message string) bool
- func (s *Suite) AssertGRPCStatusContains(err error, code codes.Code, contains string) bool
- func (s *Suite) AssertProtoEqual(expected, actual proto.Message, msgAndArgs ...interface{}) bool
- func (s *Suite) AssertProtoListEqual(expected, actual interface{}) bool
- func (s *Suite) Cleanup(cleanup func())
- func (s *Suite) RequireErrorContains(err error, contains string)
- func (s *Suite) RequireGRPCStatus(err error, code codes.Code, message string)
- func (s *Suite) RequireGRPCStatusContains(err error, code codes.Code, contains string)
- func (s *Suite) RequireProtoEqual(expected, actual proto.Message)
- func (s *Suite) RequireProtoListEqual(expected, actual interface{})
- func (s *Suite) TempDir() string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EC256Key, _ = pemutil.ParseSigner([]byte(`-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgcyW+Ne33t4e7HVxn
5aWdL02CcurRNixGgu1vVqQzq3+hRANCAASSQSfkTYd3+u8JEMJUw2Pd143QAOKP
24lWY34SXQInPaja544bc67U0dG0YCNozyAtZxIHFjV+t2HGThM8qNYg
-----END PRIVATE KEY-----
`))
DefaultKey = EC256Key
)
Functions ¶
func AssertErrorPrefix ¶ added in v1.0.0
func AssertGRPCStatus ¶
func AssertGRPCStatusHasPrefix ¶ added in v1.0.0
func AssertLastLogs ¶ added in v0.12.2
func AssertLogs ¶ added in v0.10.1
func AssertLogsAnyOrder ¶ added in v0.11.0
func AssertLogsContainEntries ¶ added in v1.1.0
func AssertProtoEqual ¶
func AssertProtoListEqual ¶
func CreateCertificate ¶
func CreateCertificate(tb testing.TB, tmpl, parent *x509.Certificate, pub, priv interface{}) *x509.Certificate
func NewAPIServer ¶ added in v0.10.1
func NewAPIServerWithMiddleware ¶ added in v1.0.1
func RequireErrorPrefix ¶ added in v1.0.0
func RequireGRPCStatus ¶
func RequireGRPCStatusHasPrefix ¶ added in v1.0.0
func RequireProtoEqual ¶
func RequireProtoListEqual ¶
func SelfSignCertificate ¶
func SelfSignCertificate(tb testing.TB, tmpl *x509.Certificate) (*x509.Certificate, crypto.Signer)
func SelfSignCertificateWithKey ¶
func SelfSignCertificateWithKey(tb testing.TB, tmpl *x509.Certificate, key crypto.Signer) *x509.Certificate
func ServeGRPCServerOnListener ¶ added in v0.12.0
func ServeGRPCServerOnSocket ¶ added in v0.12.0
func ServeGRPCServerOnTempSocket ¶ added in v0.12.0
func StartGRPCSocketServer ¶
func StartGRPCSocketServerOnTempSocket ¶ added in v0.12.0
func StartWorkloadAPIOnSocket ¶
func StartWorkloadAPIOnSocket(t *testing.T, socketPath string, server workload.SpiffeWorkloadAPIServer)
func StartWorkloadAPIOnTempSocket ¶
func StartWorkloadAPIOnTempSocket(t *testing.T, server workload.SpiffeWorkloadAPIServer) string
Types ¶
type Suite ¶
func (*Suite) AssertErrorContains ¶
func (*Suite) AssertGRPCStatus ¶
func (*Suite) AssertGRPCStatusContains ¶
func (*Suite) AssertProtoEqual ¶
func (*Suite) AssertProtoListEqual ¶
func (*Suite) RequireErrorContains ¶
func (*Suite) RequireGRPCStatus ¶
func (*Suite) RequireGRPCStatusContains ¶
func (*Suite) RequireProtoEqual ¶
func (*Suite) RequireProtoListEqual ¶
func (s *Suite) RequireProtoListEqual(expected, actual interface{})
Click to show internal directories.
Click to hide internal directories.