-
Notifications
You must be signed in to change notification settings - Fork 5
test: Add API endpoint tests #1313
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
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive API endpoint tests across multiple controllers, improving test coverage for authentication, data access, search, file system operations, and ELN integration. The changes also include necessary test infrastructure updates like disabling API throttling in the testing environment and updating factories for better test data generation.
Key Changes
- Added 10 new test files covering API endpoints for user authentication, data retrieval, search, and ELN workflows
- Disabled API throttling in the testing environment to allow full test suite execution
- Updated factory defaults for better test data consistency (Molecule identifier, FileSystemObject type)
- Commented out an unprotected DOI update route with security concerns
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 22 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/API/UserControllerTest.php | Tests for authenticated user info endpoint with various scenarios |
| tests/API/SearchControllerTest.php | Comprehensive search endpoint tests covering multiple query types and validation |
| tests/API/RegisterControllerTest.php | User registration tests with validation checks (has HTTP status code issues) |
| tests/API/LoginControllerTest.php | Login/logout functionality tests (has HTTP status code issues) |
| tests/API/FileSystemControllerTest.php | File system object retrieval tests (contains performance issue with sleep) |
| tests/API/ELNControllerTest.php | ELN upload and status tests with complex workflows (has hardcoded year issue) |
| tests/API/DataControllerTest.php | Public data listing, filtering, sorting, and retrieval tests |
| tests/API/DataCiteControllerTest.php | DataCite schema endpoint tests |
| tests/API/DataCatalogControllerTest.php | DataCatalog/Bioschemas endpoint tests |
| tests/API/BioschemasControllerTest.php | Bioschemas endpoint access control tests |
| routes/api.php | Commented out DOI update route due to security concerns (has typo) |
| database/factories/MoleculeFactory.php | Added unique identifier generation for test molecules |
| database/factories/FileSystemObjectFactory.php | Clarified 'directory' type usage in comment |
| bootstrap/app.php | Disabled API throttling during testing to allow test execution |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #1313 +/- ##
=================================================
+ Coverage 56.63% 63.10% +6.46%
- Complexity 2268 2269 +1
=================================================
Files 207 207
Lines 8733 8738 +5
=================================================
+ Hits 4946 5514 +568
+ Misses 3787 3224 -563
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@vcnainala The update method of DOIController is not being used anywhere. The artisan command - |
No description provided.