aboutsummaryrefslogtreecommitdiffstats
path: root/internal/crawler/security_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/crawler/security_test.go')
-rw-r--r--internal/crawler/security_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/crawler/security_test.go b/internal/crawler/security_test.go
index 198f7ee..f4d7b67 100644
--- a/internal/crawler/security_test.go
+++ b/internal/crawler/security_test.go
@@ -9,11 +9,12 @@ import (
"adammathes.com/neko/internal/safehttp"
)
-func init() {
+func TestGetFeedContentLimit(t *testing.T) {
+ // Enable local connections for this test
+ originalAllowLocal := safehttp.AllowLocal
safehttp.AllowLocal = true
-}
+ defer func() { safehttp.AllowLocal = originalAllowLocal }()
-func TestGetFeedContentLimit(t *testing.T) {
// 10MB limit expected
limit := 10 * 1024 * 1024
// 11MB payload