Isolate config tests from the shell; any out-of-range PORT is ErrInvalidPort (closes #94)
check / check (push) Successful in 3m17s
check / check (push) Successful in 3m17s
Config tests that unset a variable now restore it when they end, and every test that builds a Config first unsets every variable the config reads, so a value exported in the developer's shell cannot change the result. TestEnvPort checks that the bad value appears in its errors. A PORT of zero or below now wraps ErrInvalidPort, as one above 65535 already did. The README configuration table and the Settings page now say that a RETENTION_SWEEP_INTERVAL that does not parse, or is zero or negative, fails startup. Model: opus-5-5
This commit is contained in:
@@ -77,7 +77,8 @@ func settingRows(cfg *config.Config) []settingRow {
|
||||
{
|
||||
"RETENTION_SWEEP_INTERVAL",
|
||||
"How often the retention reaper and archive sweeper run " +
|
||||
"(Go duration, must be positive)",
|
||||
"(Go duration, must be positive). A value that does " +
|
||||
"not parse, or is zero or negative, fails startup",
|
||||
cfg.RetentionSweepInterval.String(),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user