Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cleanup to documents in tests #1751

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Add cleanup to documents in tests #1751

merged 1 commit into from
Jan 3, 2025

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Jan 3, 2025

Important

Adds cleanup_documents fixture to test_documents.py for automatic document cleanup in tests, replacing manual cleanup code.

  • Fixture Addition:
    • Adds cleanup_documents fixture in test_documents.py to track and delete documents created during tests.
  • Test Modifications:
    • Updates test_create_document_with_file, test_create_document_with_raw_text, test_create_document_with_chunks, and test_create_document_different_modes to use cleanup_documents for automatic cleanup.
    • Modifies test_list_document_chunks, test_search_documents_extended, test_access_document_not_owned, test_list_documents_with_pagination, test_delete_by_complex_filter, test_search_documents_no_match, test_delete_by_workflow_metadata, test_delete_by_classification_metadata, and test_delete_by_version_metadata to use cleanup_documents.
  • Behavior:
    • Ensures all documents created in tests are deleted, preventing leftover test data.

This description was created by Ellipsis for dc94a6b. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to dc94a6b in 1 minute and 40 seconds

More details
  • Looked at 541 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. py/tests/integration/test_documents.py:78
  • Draft comment:
    Consider using the cleanup_documents fixture to ensure documents are deleted even if the test fails.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. py/tests/integration/test_documents.py:228
  • Draft comment:
    Consider using the cleanup_documents fixture to ensure documents are deleted even if the test fails.
  • Reason this comment was not posted:
    Marked as duplicate.
3. py/tests/integration/test_documents.py:282
  • Draft comment:
    Consider using the cleanup_documents fixture to ensure documents are deleted even if the test fails.
  • Reason this comment was not posted:
    Marked as duplicate.
4. py/tests/integration/test_documents.py:515
  • Draft comment:
    Consider using the cleanup_documents fixture to ensure documents are deleted even if the test fails.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_BhyFqLyKUjsCbWGU


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit 4a71ebd into main Jan 3, 2025
13 of 14 checks passed
@NolanTrem NolanTrem deleted the Nolan/FixTests branch January 3, 2025 21:51
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