Skip to content

test: migrate workspace members tests to containers#36738

Merged
asukaminato0721 merged 1 commit into
langgenius:mainfrom
escape0707:codex/workspace-members-testcontainers
May 28, 2026
Merged

test: migrate workspace members tests to containers#36738
asukaminato0721 merged 1 commit into
langgenius:mainfrom
escape0707:codex/workspace-members-testcontainers

Conversation

@escape0707
Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

  • Migrates SQL-backed workspace member controller tests from mock-based unit tests to Testcontainers-backed integration tests.
  • Keeps non-DB invitation, permission, and token-validation unit coverage in place.
  • Supersedes inactive PR test: migrate workspace members mock tests to testcontainers #35203, removes its unrelated JavaScript integration-test deletion, and addresses review feedback by using real DB/Redis behavior for role updates and owner-transfer token handling.

Part of #32454

Screenshots

N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

Validation:

  • uv run --project api ruff check api/tests/test_containers_integration_tests/controllers/console/workspace/test_members.py api/tests/unit_tests/controllers/console/workspace/test_members.py
  • uv run --project api pytest api/tests/unit_tests/controllers/console/workspace/test_members.py - 20 passed
  • DOCKER_HOST=unix:///run/user/1000/podman/podman.sock uv run --project api pytest api/tests/test_containers_integration_tests/controllers/console/workspace/test_members.py - 10 passed

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 45.79% 45.77% -0.02%
Strict coverage 45.31% 45.29% -0.02%
Typed symbols 24,531 24,535 +4
Untyped symbols 29,352 29,380 +28
Modules 2740 2741 +1

Part of langgenius#32454.

Co-authored-by: jamesrayammons <63717587+jamesrayammons@users.noreply.github.com>
@escape0707 escape0707 force-pushed the codex/workspace-members-testcontainers branch from 0e46a3b to cd4704c Compare May 27, 2026 18:05
@asukaminato0721 asukaminato0721 enabled auto-merge May 28, 2026 00:42
@asukaminato0721 asukaminato0721 added this pull request to the merge queue May 28, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 28, 2026
Merged via the queue into langgenius:main with commit 678260e May 28, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants