Documentation
¶
Overview ¶
Package compatibility provides shared helpers for gVisor application compatibility tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Poll ¶
func Poll(ctx context.Context, t *testing.T, desc string, timeout, interval time.Duration, cond func() error)
Poll repeatedly calls cond until it returns nil, failing the test (via t.Fatalf) if it has not succeeded within timeout. It waits interval between attempts.
This is the preferred way to wait for a stack to become ready: poll for a readiness signal (a health endpoint, an accepted connection, etc).
desc is a short human-readable description of what is being waited for, used in the timeout message (e.g. "gitea API to be ready").
Types ¶
type Request ¶
type Request struct {
Method string // defaults to GET.
URL string
Body string
ContentType string
Host string // overrides the Host header if non-empty.
Username string // enables HTTP basic auth if non-empty.
Password string
Headers map[string]string
// Timeout overrides the default client timeout for this request.
// Zero uses the default from httpClient.
Timeout time.Duration
}
Request describes an HTTP request issued by a compatibility test.
Click to show internal directories.
Click to hide internal directories.