diff options
Diffstat (limited to 'internal/testhelpers/testhelpers.go')
-rw-r--r-- | internal/testhelpers/testhelpers.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/testhelpers/testhelpers.go b/internal/testhelpers/testhelpers.go index fdd3e7d4..ccae0557 100644 --- a/internal/testhelpers/testhelpers.go +++ b/internal/testhelpers/testhelpers.go @@ -8,11 +8,23 @@ import ( "net/url" "os" "testing" + "time" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + + "gitlab.com/gitlab-org/gitlab-pages/internal/config" ) +var TestCacheConfig = config.Cache{ + CacheExpiry: time.Second, + CacheCleanupInterval: time.Second / 2, + EntryRefreshTimeout: time.Second / 2, + RetrievalTimeout: time.Second, + MaxRetrievalInterval: time.Second / 3, + MaxRetrievalRetries: 3, +} + // AssertRedirectTo asserts that handler redirects to particular URL func AssertRedirectTo(t *testing.T, handler http.HandlerFunc, method string, url string, values url.Values, expectedURL string) { |