Documentation ¶
Index ¶
- Constants
- func AssertHTTP404(t *testing.T, handler http.HandlerFunc, mode, url string, values url.Values, ...)
- func AssertLogContains(t *testing.T, wantLogEntry string, entries []*logrus.Entry)
- func AssertRedirectTo(t *testing.T, handler http.HandlerFunc, method string, url string, ...)
- func ChdirInPath(t testing.TB, path string, chdirSet *bool) func()
- func Getwd(t *testing.T) string
- func SetEnvironmentVariable(t *testing.T, key, value string)
- func TmpDir(tb testing.TB, pattern string) (vfs.Root, string)
- func ToFileProtocol(t *testing.T, path string) string
Constants ¶
View Source
const FFEnableRateLimiter = "FF_ENABLE_RATE_LIMITER"
FFEnableRateLimiter enforces ratelimiter package to drop requests TODO: remove https://gitlab.com/gitlab-org/gitlab-pages/-/issues/629
Variables ¶
This section is empty.
Functions ¶
func AssertHTTP404 ¶
func AssertHTTP404(t *testing.T, handler http.HandlerFunc, mode, url string, values url.Values, str interface{})
AssertHTTP404 asserts handler returns 404 with provided str body
func AssertLogContains ¶ added in v1.16.0
AssertLogContains checks that wantLogEntry is contained in at least one of the log entries
func AssertRedirectTo ¶
func AssertRedirectTo(t *testing.T, handler http.HandlerFunc, method string, url string, values url.Values, expectedURL string)
AssertRedirectTo asserts that handler redirects to particular URL
func ChdirInPath ¶ added in v1.22.0
func SetEnvironmentVariable ¶ added in v1.46.0
SetEnvironmentVariable for testing, restoring the original value on t.Cleanup
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.