Documentation
¶
Index ¶
- Constants
- func BeDNSRecord(domain string, dnsType dns.Type, answer string) types.GomegaMatcher
- func DoGetRequest(ctx context.Context, url string, ...) (*httptest.ResponseRecorder, *bytes.Buffer)
- func GetHostPort(host string, port int) string
- func GetIntPort(port int) int
- func GetStringPort(port int) string
- func HaveAuthority() types.GomegaMatcher
- func HaveEdnsOption(code uint16) types.GomegaMatcher
- func HaveNoAnswer() types.GomegaMatcher
- func HaveReason(reason string) types.GomegaMatcher
- func HaveResponseType(c model.ResponseType) types.GomegaMatcher
- func HaveReturnCode(code int) types.GomegaMatcher
- func HaveSOARecord(ttl, minTTL uint32) types.GomegaMatcher
- func HaveTTL(matcher types.GomegaMatcher) types.GomegaMatcher
- func TempFile(data string) *os.File
- func TestServer(data string) *httptest.Server
- func ToAnswer(m *model.Response) []dns.RR
- func ToAuthority(m *model.Response) []dns.RR
- func ToExtra(m *model.Response) []dns.RR
- type HTTPProxy
- type MockCallSequence
- type TmpFile
- type TmpFolder
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func BeDNSRecord ¶
BeDNSRecord returns new dns matcher
func DoGetRequest ¶
func DoGetRequest(ctx context.Context, url string, fn func(w http.ResponseWriter, r *http.Request), ) (*httptest.ResponseRecorder, *bytes.Buffer)
DoGetRequest performs a GET request
func GetHostPort ¶
GetHostPort returns a host:port string for the current testing process by adding the current ginkgo parallel process to the base port and returning it as string.
func GetIntPort ¶
GetIntPort returns a port for the current testing process by adding the current ginkgo parallel process to the base port and returning it as int.
func GetStringPort ¶
GetStringPort returns a port for the current testing process by adding the current ginkgo parallel process to the base port and returning it as string.
func HaveAuthority ¶ added in v0.28.0
func HaveAuthority() types.GomegaMatcher
func HaveEdnsOption ¶
func HaveEdnsOption(code uint16) types.GomegaMatcher
HaveEdnsOption checks if the given message contains an EDNS0 record with the given option code.
func HaveNoAnswer ¶
func HaveNoAnswer() types.GomegaMatcher
func HaveReason ¶
func HaveReason(reason string) types.GomegaMatcher
func HaveResponseType ¶
func HaveResponseType(c model.ResponseType) types.GomegaMatcher
func HaveReturnCode ¶
func HaveReturnCode(code int) types.GomegaMatcher
func HaveSOARecord ¶ added in v0.28.0
func HaveSOARecord(ttl, minTTL uint32) types.GomegaMatcher
func HaveTTL ¶
func HaveTTL(matcher types.GomegaMatcher) types.GomegaMatcher
func TestServer ¶
TestServer creates temp http server with passed data
Types ¶
type HTTPProxy ¶
func TestHTTPProxy ¶
func TestHTTPProxy() *HTTPProxy
TestHTTPProxy returns a new HTTPProxy server.
All requests return http.StatusNotImplemented.
func (*HTTPProxy) RequestTarget ¶
RequestTarget returns the target of the last request.
type MockCallSequence ¶
type MockCallSequence[T any] struct { // contains filtered or unexported fields }
func NewMockCallSequence ¶
func NewMockCallSequence[T any](driver func(chan<- T, chan<- error)) MockCallSequence[T]
func (*MockCallSequence[T]) Call ¶
func (m *MockCallSequence[T]) Call() (T, error)
func (*MockCallSequence[T]) CallCount ¶
func (m *MockCallSequence[T]) CallCount() uint
func (*MockCallSequence[T]) Close ¶
func (m *MockCallSequence[T]) Close()
type TmpFolder ¶
type TmpFolder struct {
Path string
// contains filtered or unexported fields
}