Summary
Two pgxmock unit tests in internal/config/store_postgres_pgxmock_test.go fail because their mocked row definitions declare only 21 columns while the production queryExecutions scan reads 22. The 22nd scanned column (token_expires_at, scanned into tokenExpiresAt at store_postgres.go:992) was added without updating these two test mocks.
Failing tests:
TestPGXMock_GetExecutionByID_Success
TestPGXMock_GetExecutionByID_WithTimestamps
Error: failed to scan execution: incorrect argument number 22 for columns 21
Current behaviour
go test ./internal/config/... fails with 2 failures on the feat/multicloud-web-frontend base branch. Confirmed pre-existing: the failures reproduce on PR #623's HEAD 8b48278f2 after git stash-ing all PR-unrelated changes, so they are not introduced by #623.
Steps to reproduce
git checkout feat/multicloud-web-frontend
go test ./internal/config/... -run 'TestPGXMock_GetExecutionByID'
Expected behaviour
Both tests pass; the mock column set and added row values match the production scan order (22 columns).
Proposed fix
In internal/config/store_postgres_pgxmock_test.go, both test functions (around lines 384-397 and 422-439): append "token_expires_at" to the cols slice and a corresponding 22nd value (sql.NullTime{} for the NULL case, sql.NullTime{Valid: true, Time: future} for the populated case) to the AddRow(...) calls, matching the scan order in internal/config/store_postgres.go (the &tokenExpiresAt scan at line 992). Cross-check that the SELECT column lists at store_postgres.go:697-698, 784-785, 824 include token_expires_at so the mocks mirror the real query shape.
References
Severity
Test-suite breakage in the config package on the shared frontend branch. Not a production-path defect (the production scan is correct), but it blocks a green go test ./internal/config/... and masks future regressions in those tests.
Summary
Two pgxmock unit tests in
internal/config/store_postgres_pgxmock_test.gofail because their mocked row definitions declare only 21 columns while the productionqueryExecutionsscan reads 22. The 22nd scanned column (token_expires_at, scanned intotokenExpiresAtatstore_postgres.go:992) was added without updating these two test mocks.Failing tests:
TestPGXMock_GetExecutionByID_SuccessTestPGXMock_GetExecutionByID_WithTimestampsError:
failed to scan execution: incorrect argument number 22 for columns 21Current behaviour
go test ./internal/config/...fails with 2 failures on thefeat/multicloud-web-frontendbase branch. Confirmed pre-existing: the failures reproduce on PR #623's HEAD8b48278f2aftergit stash-ing all PR-unrelated changes, so they are not introduced by #623.Steps to reproduce
Expected behaviour
Both tests pass; the mock column set and added row values match the production scan order (22 columns).
Proposed fix
In
internal/config/store_postgres_pgxmock_test.go, both test functions (around lines 384-397 and 422-439): append"token_expires_at"to thecolsslice and a corresponding 22nd value (sql.NullTime{}for the NULL case,sql.NullTime{Valid: true, Time: future}for the populated case) to theAddRow(...)calls, matching the scan order ininternal/config/store_postgres.go(the&tokenExpiresAtscan at line 992). Cross-check that the SELECT column lists atstore_postgres.go:697-698,784-785,824includetoken_expires_atso the mocks mirror the real query shape.References
internal/config/store_postgres.go:954-993(22-column scan;token_expires_atat line 992).internal/config/store_postgres_pgxmock_test.go:377-411,414-449.Severity
Test-suite breakage in the
configpackage on the shared frontend branch. Not a production-path defect (the production scan is correct), but it blocks a greengo test ./internal/config/...and masks future regressions in those tests.