Skip to content

test: migrate dataset service document indexing tests to testcontainers#34022

Merged
asukaminato0721 merged 3 commits intolanggenius:mainfrom
Desel72:test/migrate-dataset-service-tests-to-testcontainers
Mar 24, 2026
Merged

test: migrate dataset service document indexing tests to testcontainers#34022
asukaminato0721 merged 3 commits intolanggenius:mainfrom
Desel72:test/migrate-dataset-service-tests-to-testcontainers

Conversation

@Desel72
Copy link
Copy Markdown
Contributor

@Desel72 Desel72 commented Mar 24, 2026

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

  • Migrate remaining mock-based dataset service document indexing tests from
    api/tests/unit_tests/services/test_dataset_service.py (129 lines, 4 tests) into
    the existing testcontainers integration test at
    api/tests/test_containers_integration_tests/services/test_dataset_service.py
    (708 lines, 22 tests).

  • The existing testcontainers file covered dataset CRUD, permission checks, and retrieval
    model updates. This PR adds 4 new tests for document pause/recover/retry orchestration
    (state transitions, DB commits, Redis flags, Celery task dispatch). External services
    (Redis, Celery) remain mocked. Then removes the fully superseded 129-line mock-based file.

Part of #32454

Screenshots

Before After
... ...

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 and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@asukaminato0721 asukaminato0721 merged commit b15d312 into langgenius:main Mar 24, 2026
14 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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants