Skip to content

✅ test(e2e): add namespace multi-tenant isolation and CLI integration tests#394

Merged
sodre merged 2 commits into
mainfrom
test/373-namespace-integration
Feb 15, 2026
Merged

✅ test(e2e): add namespace multi-tenant isolation and CLI integration tests#394
sodre merged 2 commits into
mainfrom
test/373-namespace-integration

Conversation

@sodre

@sodre sodre commented Feb 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Add TestE2ENamespaceMultiTenantLifecycle class covering full multi-tenant lifecycle: register namespaces, create entities, verify data isolation, verify rate limiting isolation, verify config isolation, soft-delete namespace, purge via GSI4, and confirm other namespaces are unaffected
  • Add TestE2ENamespaceCLIWorkflow class covering end-to-end CLI namespace commands: deploy, register, list, show, entity set-limits with --namespace, delete, orphans, recover, and cleanup
  • Both test classes use LocalStack fixtures and validate that namespace registry, --namespace flag, and per-namespace scoped repositories work together correctly
  • Clarify in .claude/rules/testing.md that xdist must stay enabled for non-benchmark test runs

Test plan

  • uv run pytest tests/e2e/test_namespace.py -v — 9/9 pass (LocalStack)
  • uv run pytest tests/unit/ -q — 2349/2349 pass
  • uv run pre-commit run --all-files — all hooks pass
  • uv run pytest tests/e2e/test_aws.py --run-aws -v — 22 passed, 1 xfailed (real AWS)

Closes #373
Closes #363

🤖 Generated with Claude Code

Add end-to-end tests for namespace management against LocalStack:

- TestE2ENamespaceMultiTenantLifecycle: register ns-a/ns-b, create
  entities, verify isolation (entity, rate limiting, config), delete
  ns-a, purge data, verify ns-b unaffected (8 async tests)
- TestE2ENamespaceCLIWorkflow: full CLI lifecycle covering namespace
  register/list/show/delete/orphans/recover and --namespace flag on
  entity commands (1 sync test)

Closes #373

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sodre sodre added this to the v0.10.0 milestone Feb 15, 2026
@sodre sodre added testing Test coverage area/cli Command line interface area/limiter Core rate limiting logic labels Feb 15, 2026
@codecov

codecov Bot commented Feb 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.88%. Comparing base (de8ff6d) to head (9e9b260).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #394   +/-   ##
=======================================
  Coverage   91.88%   91.88%           
=======================================
  Files          33       33           
  Lines        7435     7435           
=======================================
  Hits         6832     6832           
  Misses        603      603           
Flag Coverage Δ
doctest 29.41% <ø> (ø)
e2e 41.17% <ø> (+0.64%) ⬆️
integration 50.81% <ø> (+0.68%) ⬆️
unit 91.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sodre sodre marked this pull request as ready for review February 15, 2026 14:02
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sodre sodre merged commit 01ccc9d into main Feb 15, 2026
16 checks passed
@sodre sodre deleted the test/373-namespace-integration branch February 15, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Command line interface area/limiter Core rate limiting logic testing Test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✅ Integration testing and closing tasks for namespace management ✨ Namespace registry, CLI management, and per-namespace IAM policies

1 participant