Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testutil holds helpers shared across ScrapeGoat's test packages. Nothing outside a _test.go file should import it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoopbackConfig

func LoopbackConfig() *config.Config

LoopbackConfig returns the default configuration with the outbound address checks relaxed, so the fetcher can reach an httptest server.

httptest.NewServer always binds 127.0.0.1, and the default safety policy refuses to dial loopback — that refusal is the SSRF guard doing its job, not a bug. Tests that drive a local server opt out here, explicitly and in one place, rather than the production default being weakened to accommodate them.

Never use this outside tests: it makes the process willing to fetch 169.254.169.254 and anything else on the local network.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL