TestNewApp_StopTimeout and TestNewApp_SendsFxEventsToTheLogger in cmd/webhooker/main_test.go both build the app graph, which runs config.New, so a variable exported in the developer's shell reached them; METRICS_USERNAME without METRICS_PASSWORD failed the second. Both now call config.ClearEnvForTest before setting their own variables, as the config tests and the first-boot test in internal/gormlog already do. Test change only.
The other tests in that file that set DATA_DIR (TestRunRefusesLockedDataDir, TestDispatch_NoArgumentsRunsTheServer) read it through config.DataDir and are refused before the graph is built, so they never run config.New and are left as they were. No other test outside internal/config builds a Config through config.New.
Judgement call: TestNewApp_StopTimeout passes whatever the shell exports, because the stop timeout is set even when the graph fails, but it does run config.New, so the issue's definition of done covers it.
Model: opus-5-5
`TestNewApp_StopTimeout` and `TestNewApp_SendsFxEventsToTheLogger` in `cmd/webhooker/main_test.go` both build the app graph, which runs `config.New`, so a variable exported in the developer's shell reached them; `METRICS_USERNAME` without `METRICS_PASSWORD` failed the second. Both now call `config.ClearEnvForTest` before setting their own variables, as the config tests and the first-boot test in `internal/gormlog` already do. Test change only.
The other tests in that file that set `DATA_DIR` (`TestRunRefusesLockedDataDir`, `TestDispatch_NoArgumentsRunsTheServer`) read it through `config.DataDir` and are refused before the graph is built, so they never run `config.New` and are left as they were. No other test outside `internal/config` builds a Config through `config.New`.
Judgement call: `TestNewApp_StopTimeout` passes whatever the shell exports, because the stop timeout is set even when the graph fails, but it does run `config.New`, so the issue's definition of done covers it.
Model: opus-5-5
TestNewApp_StopTimeout and TestNewApp_SendsFxEventsToTheLogger both
build the app graph, which runs config.New, so a variable exported in
the developer's shell reached them: METRICS_USERNAME without
METRICS_PASSWORD failed the second. Both now call
config.ClearEnvForTest before setting their own variables, as the
config tests and the gormlog first-boot test already do.
Model: opus-5-5
Review passed: both cmd/webhooker tests that build a Config through config.New now clear the environment first, and nothing else changed.
Model: opus-5-5
Review passed: both `cmd/webhooker` tests that build a Config through `config.New` now clear the environment first, and nothing else changed.
Model: opus-5-5
clawbot
merged commit bf3df0312b into next2026-10-02 18:03:32 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
TestNewApp_StopTimeoutandTestNewApp_SendsFxEventsToTheLoggerincmd/webhooker/main_test.goboth build the app graph, which runsconfig.New, so a variable exported in the developer's shell reached them;METRICS_USERNAMEwithoutMETRICS_PASSWORDfailed the second. Both now callconfig.ClearEnvForTestbefore setting their own variables, as the config tests and the first-boot test ininternal/gormlogalready do. Test change only.The other tests in that file that set
DATA_DIR(TestRunRefusesLockedDataDir,TestDispatch_NoArgumentsRunsTheServer) read it throughconfig.DataDirand are refused before the graph is built, so they never runconfig.Newand are left as they were. No other test outsideinternal/configbuilds a Config throughconfig.New.Judgement call:
TestNewApp_StopTimeoutpasses whatever the shell exports, because the stop timeout is set even when the graph fails, but it does runconfig.New, so the issue's definition of done covers it.Model: opus-5-5
Review passed: both
cmd/webhookertests that build a Config throughconfig.Newnow clear the environment first, and nothing else changed.Model: opus-5-5