go-agent: github.com/sqreen/go-agent/tools/testlib Index | Files | Directories

package testlib

import "github.com/sqreen/go-agent/tools/testlib"

Index

Package Files

agent.go rand.go

func RandHTTPHeaderValue Uses

func RandHTTPHeaderValue(length ...int) string

func RandPrintableUSASCIIString Uses

func RandPrintableUSASCIIString(length ...int) string

func RandUTF8String Uses

func RandUTF8String(length ...int) string

func RandUint32 Uses

func RandUint32(boundaries ...uint32) uint32

type AgentMockup Uses

type AgentMockup struct {
    mock.Mock
}

func NewAgentForMiddlewareTestsWithSecurityResponse Uses

func NewAgentForMiddlewareTestsWithSecurityResponse(actionHandler http.Handler) (*AgentMockup, *testmock.RequestRecordMockup)

func NewAgentForMiddlewareTestsWithUserSecurityResponse Uses

func NewAgentForMiddlewareTestsWithUserSecurityResponse(actionHandler http.Handler) (*AgentMockup, *testmock.RequestRecordMockup)

func NewAgentForMiddlewareTestsWithoutSecurityResponse Uses

func NewAgentForMiddlewareTestsWithoutSecurityResponse() (*AgentMockup, *testmock.RequestRecordMockup)

func (*AgentMockup) ExpectGracefulStop Uses

func (a *AgentMockup) ExpectGracefulStop() *mock.Call

func (*AgentMockup) ExpectNewRequestRecord Uses

func (a *AgentMockup) ExpectNewRequestRecord(r interface{}) *mock.Call

func (*AgentMockup) GracefulStop Uses

func (a *AgentMockup) GracefulStop()

func (*AgentMockup) NewRequestRecord Uses

func (a *AgentMockup) NewRequestRecord(r *http.Request) (types.RequestRecord, *http.Request)

func (*AgentMockup) ResetExpectations Uses

func (a *AgentMockup) ResetExpectations()

Directories

PathSynopsis
testmock

Package testlib imports 7 packages (graph). Updated 2020-02-17. Refresh now. Tools for package owners.