test(hygiene): default seed credential is hard-coded in CLI test teardown #43
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#43
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Follow-up from the verification of #39 (comment #issuecomment-884). Minor.
Problem
tests/test_cli_commands.py::test_user_command_does_not_resurrect_deleted_userdeletes the defaultadminaccount and restores it in teardown by re-creating it with the literal seed password:The test itself is sound — it was verified to fail against the pre-fix commit
7f3e2f4and pass after — but it copies the seed credential fromapp/db/database.py:390into the test suite by hand.Two consequences: the credential string now lives in a second place and can drift from the seeder, and a grep for the default password returns test files as well as the seeder.
Proposed fix
Import the seed constant rather than retyping it, or restore the fixture state through a helper that reuses whatever
init_dbseeds. Extracting the seed pairs indatabase.py:390into a named module-level constant would serve both this and any future test that needs the same thing.Acceptance criteria
test_user_command_does_not_resurrect_deleted_userstill fails against7f3e2f4and passes onmaster.gabogg referenced this issue2026-09-21 18:35:05 +00:00
Ready to implement — delivered in PR #45 (
Closes #43). Re-taggedready-for-agent; auto-closes on merge.