Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectRoot ¶
ProjectRoot is a utility function for returning root path of the networker source code on this machine. It's primary purpose is to help construct absolute paths needed by tests.
func WithMockServer ¶
func WithMockServer(t *testing.T, fn RequestFunc)
WithMockServer is a pre-test hook that starts the pre-configured mock server and passes it's URL to to the down stream test. It also handles teardown of the server and ensures the underlying test is parallelized.
Types ¶
type MockObject ¶
MockObject is an arbitrary object that can be encoded/decoded and it's primary function is to provide a shape for the mock web server to use for its transport and store layers.
type RequestFunc ¶
RequestFunc is the method signature the WithMockServer hook expects.
Click to show internal directories.
Click to hide internal directories.