TestNewApp_SendsFxEventsToTheLogger in cmd/webhooker/main_test.go (from #443) builds a Config without clearing the environment, so a variable exported in the developer's shell changes its result: a METRICS_USERNAME without METRICS_PASSWORD fails it. Found by the review of #444, which added config.ClearEnvForTest for exactly this.
Definition of done
Every test outside internal/config that builds a Config through config.New calls config.ClearEnvForTest before setting its own variables.
Nothing else changes.
Model: opus-5-5
`TestNewApp_SendsFxEventsToTheLogger` in `cmd/webhooker/main_test.go` (from https://git.eeqj.de/sneak/webhooker/pulls/443) builds a Config without clearing the environment, so a variable exported in the developer's shell changes its result: a `METRICS_USERNAME` without `METRICS_PASSWORD` fails it. Found by the review of https://git.eeqj.de/sneak/webhooker/pulls/444, which added `config.ClearEnvForTest` for exactly this.
## Definition of done
- Every test outside `internal/config` that builds a Config through `config.New` calls `config.ClearEnvForTest` before setting its own variables.
- Nothing else changes.
Model: opus-5-5
#453 makes the two tests in cmd/webhooker/main_test.go that build the app graph (TestNewApp_StopTimeout and TestNewApp_SendsFxEventsToTheLogger) call config.ClearEnvForTest before setting their own variables. The first-boot test in internal/gormlog already did; no other test outside internal/config builds a Config through config.New.
Judgement call: TestNewApp_StopTimeout is included although its result does not depend on the shell, because it does run config.New.
Model: opus-5-5
https://git.eeqj.de/sneak/webhooker/pulls/453 makes the two tests in `cmd/webhooker/main_test.go` that build the app graph (`TestNewApp_StopTimeout` and `TestNewApp_SendsFxEventsToTheLogger`) call `config.ClearEnvForTest` before setting their own variables. The first-boot test in `internal/gormlog` already did; no other test outside `internal/config` builds a Config through `config.New`.
Judgement call: `TestNewApp_StopTimeout` is included although its result does not depend on the shell, because it does run `config.New`.
Model: opus-5-5
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_SendsFxEventsToTheLoggerincmd/webhooker/main_test.go(from #443) builds a Config without clearing the environment, so a variable exported in the developer's shell changes its result: aMETRICS_USERNAMEwithoutMETRICS_PASSWORDfails it. Found by the review of #444, which addedconfig.ClearEnvForTestfor exactly this.Definition of done
internal/configthat builds a Config throughconfig.Newcallsconfig.ClearEnvForTestbefore setting its own variables.Model: opus-5-5
#453 makes the two tests in
cmd/webhooker/main_test.gothat build the app graph (TestNewApp_StopTimeoutandTestNewApp_SendsFxEventsToTheLogger) callconfig.ClearEnvForTestbefore setting their own variables. The first-boot test ininternal/gormlogalready did; no other test outsideinternal/configbuilds a Config throughconfig.New.Judgement call:
TestNewApp_StopTimeoutis included although its result does not depend on the shell, because it does runconfig.New.Model: opus-5-5