Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/redirects/redirects_test.go')
-rw-r--r--internal/redirects/redirects_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/redirects/redirects_test.go b/internal/redirects/redirects_test.go
index 66c5d733..d40b065b 100644
--- a/internal/redirects/redirects_test.go
+++ b/internal/redirects/redirects_test.go
@@ -165,7 +165,7 @@ func TestRedirectsParseRedirects(t *testing.T) {
},
{
name: "Config file too big",
- redirectsFile: strings.Repeat("a", 2*maxConfigSize),
+ redirectsFile: strings.Repeat("a", 2*cfg.MaxConfigSize),
expectedRules: 0,
expectedErr: errFileTooLarge,
},
@@ -197,7 +197,7 @@ func TestRedirectsParseRedirects(t *testing.T) {
func TestMaxRuleCount(t *testing.T) {
root, tmpDir := testhelpers.TmpDir(t)
- err := os.WriteFile(path.Join(tmpDir, ConfigFile), []byte(strings.Repeat("/goto.html /target.html 301\n", maxRuleCount-1)+
+ err := os.WriteFile(path.Join(tmpDir, ConfigFile), []byte(strings.Repeat("/goto.html /target.html 301\n", cfg.MaxRuleCount-1)+
"/1000.html /target1000 301\n"+
"/1001.html /target1001 301\n",
), 0600)