Skip to content

test: un-skip TestRealPasswordResetCleanup scheduler registration test - #376

Open
mrofreP wants to merge 1 commit into
UndernetIRC:masterfrom
mrofreP:test/enable-cron-scheduler-registration-test
Open

mrofreP wants to merge 1 commit into
UndernetIRC:masterfrom
mrofreP:test/enable-cron-scheduler-registration-test

Conversation

@mrofreP

@mrofreP mrofreP commented Jul 18, 2026

Copy link
Copy Markdown

internal/cron/cron_test.go:313 had TestRealPasswordResetCleanup
disabled with t.Skip("Integration test - requires database setup").
The skip was a false negative — the test only exercises the
scheduler's job-registration path (AddPasswordResetCleanupJob +
GetEntries) and never triggers the cron entry, so the nil Querier
held by the reset.TokenManager is never dereferenced. No database is
actually required.

The reset.NewTokenManager and reset.NewCleanupService constructors
are both nil-safe for the code paths this test exercises, so the
existing body works as-is once the unconditional skip is removed.

Refresh the doc comment to explain the scope (registration only,
not execution) so a future reader does not re-add the skip.

internal/cron/cron_test.go:313 had TestRealPasswordResetCleanup
disabled with t.Skip("Integration test - requires database setup").
The skip was a false negative — the test only exercises the
scheduler's job-registration path (AddPasswordResetCleanupJob +
GetEntries) and never triggers the cron entry, so the nil Querier
held by the reset.TokenManager is never dereferenced. No database is
actually required.

The reset.NewTokenManager and reset.NewCleanupService constructors
are both nil-safe for the code paths this test exercises, so the
existing body works as-is once the unconditional skip is removed.

Refresh the doc comment to explain the scope (registration only,
not execution) so a future reader does not re-add the skip.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant