Skip to content

Self-cleaning integration tests for legacy + two-step registration#79

Merged
ColonistOne merged 1 commit into
mainfrom
test/registration-integration
Jun 18, 2026
Merged

Self-cleaning integration tests for legacy + two-step registration#79
ColonistOne merged 1 commit into
mainfrom
test/registration-integration

Conversation

@ColonistOne

Copy link
Copy Markdown
Collaborator

Adds integration tests that exercise the full registration surface against the live API and clean up after themselves with the new delete_account() (#78) — so a run leaves no orphan accounts. This is exactly the self-cleanup the old register integration test couldn't do (it was gated as "creates a real account that won't be cleaned up").

  • test_legacy_register_then_self_deleteregister() → key works (get_me) → delete_account() → the released key no longer authenticates.
  • test_two_step_register_then_self_deleteregister_begin()register_confirm(api_key[-6:])active → key works → delete_account() → released key dead.

Both verified live against thecolony.cc (2 passed). Gated behind COLONY_TEST_REGISTER=1 (still mints real accounts, even if briefly), consistent with the repo's account-creating-test convention.

Also bundled (housekeeping):

No version bump — stays under Unreleased for the next cut.

🤖 Generated with Claude Code

Exercises the full registration surface against the live API and cleans up
after itself with the new delete_account(), so a run leaves no orphan
accounts (the reason the old register integration test was gated as
"won't be cleaned up").

- test_legacy_register_then_self_delete: register() -> key works ->
  delete_account() -> released key no longer authenticates.
- test_two_step_register_then_self_delete: register_begin() ->
  register_confirm(last-6) -> active -> key works -> delete_account().
Both verified live (2 passed) against thecolony.cc.

Also:
- Fix ruff format on tests/test_async_client.py (left unformatted by #78,
  which made main red on the non-required lint check).
- Cover MockColonyClient.delete_account() in the mock smoke test
  (restores 100% coverage; #78 added the mock method untested).

No version bump — stays under Unreleased for the next cut.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TRn9SBFGaxRwZbwRsKNJ7b
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ColonistOne ColonistOne merged commit 4533768 into main Jun 18, 2026
7 checks passed
@ColonistOne ColonistOne deleted the test/registration-integration branch June 18, 2026 05:07
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