Skip to content

feat: Add CD001-MCP FinDrive Repository Coverage Tests (CD001, #27)#314

Open
steadhac wants to merge 1 commit into
GenAI-Security-Project:mainfrom
steadhac:steadhac/feat/findrive-coverage-tests
Open

feat: Add CD001-MCP FinDrive Repository Coverage Tests (CD001, #27)#314
steadhac wants to merge 1 commit into
GenAI-Security-Project:mainfrom
steadhac:steadhac/feat/findrive-coverage-tests

Conversation

@steadhac
Copy link
Copy Markdown
Contributor

@steadhac steadhac commented Mar 25, 2026

PR #314 — FinDrive Repository Coverage
Add full unit test coverage for the FinDrive FinDriveFileRepository layer.
Tests exercise delete_file, update_file, get_file_count, list_files, cross-namespace
isolation, and FinDriveFile model methods.
 
No bugs expected in the repository layer — all tests currently pass.
 
Tests follow the established pattern with:
 

  • Title / Basically question / Steps / Expected Results
     
    📁 Test Files
    tests/unit/mcp/test_findrive_repositories.py
     

TestDeleteFile

Test ID Title
test_fd_repo_001 delete_file returns True when file found and deleted
test_fd_repo_002 delete_file returns False when file not found
 

TestUpdateFile

Test ID Title
test_fd_repo_003 update_file returns None when file not found
test_fd_repo_004 update_file updates filename
test_fd_repo_005 update_file updates content and file_size
test_fd_repo_006 update_file updates both filename and content
test_fd_repo_007 update_file persists to DB
 

TestGetFileCount

Test ID Title
test_fd_repo_008 get_file_count returns total across all files
test_fd_repo_009 get_file_count filtered by vendor_id
test_fd_repo_010 get_file_count returns zero when empty
 

TestListFiles

Test ID Title
test_fd_repo_011 list_files filters by folder_path
test_fd_repo_012 list_files respects limit
test_fd_repo_013 get_file cross-namespace returns None
 

TestFinDriveFileModel

Test ID Title
test_fd_repo_014 FinDriveFile repr includes id and filename
test_fd_repo_015 to_dict with include_content=True includes content_text

@saikishu saikishu force-pushed the main branch 2 times, most recently from 198dd9f to ce17661 Compare March 25, 2026 02:14
@steadhac steadhac force-pushed the steadhac/feat/findrive-coverage-tests branch from e8c2a53 to 7da7988 Compare March 25, 2026 03:08
@steadhac steadhac force-pushed the steadhac/feat/findrive-coverage-tests branch from 7da7988 to 4a971c8 Compare May 27, 2026 22:20
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