Give the login rate limit tests the default request timeout (closes #61)
check / check (push) Successful in 2m55s
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:
@@ -51,11 +51,12 @@ func newTestServer(t *testing.T) *Server {
|
||||
|
||||
stateDir := t.TempDir()
|
||||
cfg := &config.Config{
|
||||
Debug: true,
|
||||
SigningKey: testSigningKey,
|
||||
StateDir: stateDir,
|
||||
DBURL: "file:" + filepath.Join(stateDir, "state.sqlite3"),
|
||||
TrustedProxies: []netip.Prefix{netip.MustParsePrefix("10.0.0.0/8")},
|
||||
Debug: true,
|
||||
SigningKey: testSigningKey,
|
||||
StateDir: stateDir,
|
||||
DBURL: "file:" + filepath.Join(stateDir, "state.sqlite3"),
|
||||
TrustedProxies: []netip.Prefix{netip.MustParsePrefix("10.0.0.0/8")},
|
||||
DownstreamTimeout: config.DefaultDownstreamTimeout,
|
||||
}
|
||||
|
||||
lc := fxtest.NewLifecycle(t)
|
||||
|
||||
Reference in New Issue
Block a user