Skip to content

[Test]: cover member store update paths - #110

Merged
viiccwen merged 1 commit into
mainfrom
test/member-store-update-paths
Jul 13, 2026
Merged

[Test]: cover member store update paths#110
viiccwen merged 1 commit into
mainfrom
test/member-store-update-paths

Conversation

@viiccwen

Copy link
Copy Markdown
Contributor

Summary

Add focused unit coverage for member binding, subscription, and personal prompt update paths. Tests use isolated tmp_path caches and mock every Google Apps Script API boundary.

Related Issue

Fixes #87

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Configuration or deployment
  • Tests

Changes

  • Cover email binding validation, existing/conflicting bindings, expiration, API failures, local save failures, and success.
  • Cover subscription member validation, unsubscribe-all, platform and binding rules, API/save failures, and success.
  • Cover personal prompt missing-member, normalization, truncation, API failure, and success paths.
  • Move subscription update coverage into a focused update suite and remove the superseded private-helper mocks from the lookup/reload suite.

Testing

  • Local tests or checks pass: make test (198 passed)
  • Manual verification completed: focused member-store tests (32 passed), make precommit, and git diff --check
  • Not tested; reason:

Impact Checklist

  • Discord bot behavior checked, if affected
  • MCP server behavior checked, if affected
  • Webhook behavior checked, if affected
  • Docker or compose changes checked, if affected
  • Environment variables documented, if changed
  • Logs do not expose secrets or sensitive data

Notes for Reviewers

This is a test-only change. It replaces the module cache with a MemberCache backed by tmp_path, disables reload fallback synchronization, and mocks update_member_fields; it never calls the real member API or reads/writes the configured member DB file.

Signed-off-by: viiccwen <vicwen@apache.org>
@viiccwen
viiccwen marked this pull request as ready for review July 13, 2026 05:55
@viiccwen
viiccwen merged commit b6fbf88 into main Jul 13, 2026
2 checks passed
@viiccwen
viiccwen deleted the test/member-store-update-paths branch July 13, 2026 05:55
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.

[Feature]: Add unit tests for member store update paths

1 participant