Documentation
¶
Index ¶
- func CopyCLI(t *testing.T, destination string)
- func RunTests(m *testing.M) (code int)
- func TestFile(t *testing.T, contents string) string
- func TestRunMockTestWithFlags(t *testing.T, args ...string)
- func TestRunMockTestWithPipeAndFlags(t *testing.T, pipeData []byte, args ...string)
- type OnlyMockServerDialer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyCLI ¶ added in v1.41.0
CopyCLI gives a test a private executable while RunTests owns compilation. The destination must not exist; its parent should belong to the caller.
func RunTests ¶ added in v1.39.0
RunTests owns one lazily built CLI for a package's tests. Each invocation still runs in a fresh process; only compilation is shared. Call it from TestMain.
func TestRunMockTestWithFlags ¶
TestRunMockTestWithFlags runs a test against a mock server with the provided CLI args and ensures it succeeds
Types ¶
type OnlyMockServerDialer ¶
type OnlyMockServerDialer struct{}
OnlyMockServerDialer only allows network connections to the mock server
func (*OnlyMockServerDialer) DialContext ¶
Click to show internal directories.
Click to hide internal directories.