Documentation ¶
Index ¶
- Constants
- func AppendAnswer(m *dns.Msg, rr ...dns.RR)
- func AssertAttr(t *testing.T, i int, a pdp.AttributeAssignment, e pdp.AttributeAssignment)
- func AssertAttrList(t *testing.T, actual []pdp.AttributeAssignment, ...)
- func AssertCRExtraResult(t *testing.T, desc string, io *testIORoutine, eMsg *dns.Msg, ...) bool
- func AssertDNSMessage(t *testing.T, desc string, rc int, m *dns.Msg, erc int, eMsg string) bool
- func AssertDnstapAttributes(t *testing.T, desc string, a []*pb.DnstapAttribute, e ...*pb.DnstapAttribute) bool
- func AssertDnstapList(t *testing.T, actual []*pb.DnstapAttribute, expected ...*pb.DnstapAttribute)
- func AssertPanicWithError(t *testing.T, desc string, f func(), format string, args ...interface{})
- func AssertPanicWithErrorContains(t *testing.T, desc string, f func(), e string)
- func AssertPdpResponse(t *testing.T, r *pdp.Response, expEff int, o ...pdp.AttributeAssignment)
- func AssertValue(t *testing.T, i int, av pdp.AttributeValue, ev pdp.AttributeValue)
- func CopyEdns0(in ...*dns.OPT) []*dns.OPT
- func MakeDnOrFail(t *testing.T, qName string) domain.Name
- func MakeTestDNSMsg(n string, t uint16, c uint16) *dns.Msg
- func MakeTestDNSMsgWithEdns0(n string, t uint16, c uint16, o ...*dns.OPT) *dns.Msg
- func MakeTestDomain(s string) domain.Name
- func NewA(a net.IP) dns.RR
- func NewAAAA(a net.IP) dns.RR
- func NewCNAME(s string) dns.RR
- func NewEdns0(o ...dns.EDNS0) *dns.OPT
- func NewEdns0Cookie(s string) dns.EDNS0
- func NewEdns0Local(c uint16, b []byte) dns.EDNS0
- func NewEdns0Subnet(ip net.IP) dns.EDNS0
- func NewErraticPep(c pep.Client, err ...error) *erraticPep
- func NewIORoutine() *testIORoutine
- func NewLogGrabber() *logGrabber
- func NewTestAddressedNonwriter(ra string) *testAddressedNonwriter
- func NewTestAddressedNonwriterWithAddr(ra net.Addr) *testAddressedNonwriter
- func WaitForPortClosed(address string) error
- func WaitForPortOpened(address string) error
- type LoggedServer
- type MockPdpClient
- type MockPlugin
Constants ¶
View Source
const ( MpModeConst = iota MpModeInc MpModeHalfInc )
Variables ¶
This section is empty.
Functions ¶
func AssertAttr ¶
func AssertAttr(t *testing.T, i int, a pdp.AttributeAssignment, e pdp.AttributeAssignment)
func AssertAttrList ¶
func AssertAttrList(t *testing.T, actual []pdp.AttributeAssignment, expected ...pdp.AttributeAssignment)
func AssertCRExtraResult ¶
func AssertDNSMessage ¶
func AssertDnstapAttributes ¶
func AssertDnstapAttributes(t *testing.T, desc string, a []*pb.DnstapAttribute, e ...*pb.DnstapAttribute) bool
func AssertDnstapList ¶
func AssertDnstapList(t *testing.T, actual []*pb.DnstapAttribute, expected ...*pb.DnstapAttribute)
func AssertPanicWithError ¶
func AssertPdpResponse ¶
func AssertValue ¶
func AssertValue(t *testing.T, i int, av pdp.AttributeValue, ev pdp.AttributeValue)
func MakeTestDNSMsgWithEdns0 ¶
func MakeTestDomain ¶
func NewEdns0Cookie ¶
func NewErraticPep ¶
func NewIORoutine ¶
func NewIORoutine() *testIORoutine
func NewLogGrabber ¶
func NewLogGrabber() *logGrabber
func NewTestAddressedNonwriter ¶
func NewTestAddressedNonwriter(ra string) *testAddressedNonwriter
func WaitForPortClosed ¶
func WaitForPortOpened ¶
Types ¶
type LoggedServer ¶
func NewServer ¶
func NewServer(opts ...server.Option) *LoggedServer
func StartPDPServer ¶
func StartPDPServer(t *testing.T, p, endpoint string) *LoggedServer
func (*LoggedServer) Stop ¶
func (s *LoggedServer) Stop() string
type MockPdpClient ¶
type MockPdpClient struct { T *testing.T In []pdp.AttributeAssignment Out []pdp.AttributeAssignment Effect int Status error Err error }
func NewMockPdpClient ¶
func NewMockPdpClient(t *testing.T) *MockPdpClient
func (*MockPdpClient) Close ¶
func (mpc *MockPdpClient) Close()
func (*MockPdpClient) Connect ¶
func (mpc *MockPdpClient) Connect(addr string) error
func (*MockPdpClient) Validate ¶
func (mpc *MockPdpClient) Validate(in, out interface{}) error
type MockPlugin ¶
func (*MockPlugin) Name ¶
func (p *MockPlugin) Name() string
Name implements the plugin.Handler interface.
Click to show internal directories.
Click to hide internal directories.