Documentation
¶
Index ¶
- Constants
- func BuildDirectory() string
- func FalseCreateOpts() *options.Create
- func GetHTTPClient() *http.Client
- func GetPortNumber() int
- func IsDockerCase(testName string) bool
- func PutHTTPClient(client *http.Client)
- func RemoveWhitespace(str string) string
- func SkipDockerIfUnsupported(t *testing.T)
- func SleepCreateOpts(num int) *options.Create
- func TrueCreateOpts() *options.Create
- func WaitForRESTService(ctx context.Context, url string) error
- func WaitForWireService(ctx context.Context, addr net.Addr) error
- func YesCreateOpts(timeout time.Duration) *options.Create
- type OptsModify
Constants ¶
const ( TestTimeout = 5 * time.Second RPCTestTimeout = 30 * time.Second ProcessTestTimeout = 15 * time.Second ManagerTestTimeout = 5 * TestTimeout LongTestTimeout = 100 * time.Second )
Constants for test timeouts.
const DefaultDockerImage = "ubuntu"
DefaultDockerImage is the default image for testing Docker.
Variables ¶
This section is empty.
Functions ¶
func BuildDirectory ¶
func BuildDirectory() string
func FalseCreateOpts ¶
FalseCreateOpts creates the options to run the "false" command.
func GetHTTPClient ¶
GetHTTPClient gets an HTTP client from the client pool.
func GetPortNumber ¶
func GetPortNumber() int
GetPortNumber returns a new port number that has not been used in the current runtime.
func IsDockerCase ¶
IsDockerCase returns whether or not the test case is a Docker test case.
func PutHTTPClient ¶
PutHTTPClient returns the given HTTP client back to the pool.
func RemoveWhitespace ¶
RemoveWhitespace returns the string without any whitespace characters.
func SkipDockerIfUnsupported ¶
SkipDockerIfUnsupported skips the test if the platform is not Linux or the SKIP_DOCKER_TESTS environment variable is explicitly set.
func SleepCreateOpts ¶
SleepCreateOpts creates the options to run the "sleep" command for the give nnumber of seconds.
func TrueCreateOpts ¶
TrueCreateOpts creates the options to run the "true" command.
func WaitForRESTService ¶
WaitForRESTService waits until either the REST service becomes available to serve requests or the context is done.
func WaitForWireService ¶
WaitForWireService waits until either the wire service becomes available to serve requests or the context times out.
Types ¶
type OptsModify ¶
OptsModify functions mutate creation options for tests.