testutil

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

testutil package implements utilities for testing. This package is not used by production code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProbe

func NewProbe(t testing.TB, u string) probe.Probe

func NewStore

func NewStore(t testing.TB) *store.Store

func NewStoreWithConsole added in v0.11.0

func NewStoreWithConsole(t testing.TB, w io.Writer) *store.Store

func NewStoreWithLog

func NewStoreWithLog(t testing.TB) *store.Store

func RunCheck

func RunCheck(ctx context.Context, p probe.Probe) []api.Record

func StartTestServer

func StartTestServer(t testing.TB) *httptest.Server

Types

type Certificate

type Certificate struct {
	PrivateKey  *rsa.PrivateKey
	CertFile    string
	KeyFile     string
	Certificate *x509.Certificate
}

func NewCertificate

func NewCertificate(t *testing.T) Certificate

func (Certificate) Client

func (c Certificate) Client() *http.Client

type DummyReporter

type DummyReporter struct {
	sync.Mutex

	Records []api.Record
}

func (*DummyReporter) Report

func (r *DummyReporter) Report(rec api.Record)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL