Give the login rate limit tests the default request timeout (closes #61)
check / check (push) Successful in 2m55s

newTestServer left downstream_timeout at zero, so every request in those
tests ran with an already expired per-request timeout. It now uses
config.DefaultDownstreamTimeout, as a real config would. Approved by the
owner on the issue.

Model: opus-5-5
This commit is contained in:
2026-09-29 06:12:11 +00:00
parent d2dfd6e58a
commit 2c4dfe929a
@@ -51,11 +51,12 @@ func newTestServer(t *testing.T) *Server {
stateDir := t.TempDir() stateDir := t.TempDir()
cfg := &config.Config{ cfg := &config.Config{
Debug: true, Debug: true,
SigningKey: testSigningKey, SigningKey: testSigningKey,
StateDir: stateDir, StateDir: stateDir,
DBURL: "file:" + filepath.Join(stateDir, "state.sqlite3"), DBURL: "file:" + filepath.Join(stateDir, "state.sqlite3"),
TrustedProxies: []netip.Prefix{netip.MustParsePrefix("10.0.0.0/8")}, TrustedProxies: []netip.Prefix{netip.MustParsePrefix("10.0.0.0/8")},
DownstreamTimeout: config.DefaultDownstreamTimeout,
} }
lc := fxtest.NewLifecycle(t) lc := fxtest.NewLifecycle(t)