Repository navigation
test: cover the API endpoints added without tests - #1261
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Commit pinning and access cases tests/Feature/Controllers/Api/CommitPinControllerTest.php |
Tests pin replacement and removal, stale unpin requests, ownership, eligible commits, and signed requests. |
Commit restoration outcomes tests/Feature/Controllers/Api/CommitRestorationControllerTest.php |
Tests restoration responses, timing limits, repeated requests, ownership, deleted commits, and signed requests. |
Commit search results and validation tests/Feature/Controllers/Api/CommitSearchControllerTest.php |
Tests result ordering and fields, filtering, limits, query validation, and signed requests. |
Commit translation responses tests/Feature/Controllers/Api/CommitTranslationControllerTest.php |
Tests translation results, eligibility, validation, provider failures and retries, stored-body preservation, and signed requests. |
Scheduled-commit API tests
| Layer / File(s) | Summary |
|---|---|
Queue, scheduling, and cancellation tests/Feature/Controllers/Api/ScheduledCommitControllerTest.php |
Tests queue contents, scheduling inputs and outcomes, cancellation, ownership, timeouts, and signed requests. |
Scheduled-commit submission tests/Feature/Controllers/Api/ScheduledCommitSubmissionControllerTest.php |
Tests submission state and commit linkage, duplicate or canceled submissions, ownership, timeouts, and signed requests. |
Suggestion and search API tests
| Layer / File(s) | Summary |
|---|---|
Mention suggestion results and context tests/Feature/Controllers/Api/MentionSuggestionControllerTest.php |
Tests follow ordering, filtering, organization and reply or quote context, validation, and signed requests. |
User search results tests/Feature/Controllers/Api/UserSearchControllerTest.php |
Tests matching, follow-state fields, private-field omission, muted and blocked-user filtering, validation, and signed requests. |
Issue suggestion lookup tests/Feature/Controllers/Api/IssueSuggestionControllerTest.php |
Tests GitHub lookup responses, query validation, and signed requests. |
Device and user API tests
| Layer / File(s) | Summary |
|---|---|
Device listing and revocation tests/Feature/Controllers/Api/DeviceControllerTest.php |
Tests device listing and revocation, ownership, signing-device revocation, and signed requests. |
User settings response tests/Feature/Controllers/Api/UserSettingsControllerTest.php |
Tests configured and default settings, language entries and sorting, admin-handle matching, and signed requests. |
User preference updates tests/Feature/Controllers/Api/UserAutomaticTranslationControllerTest.php, tests/Feature/Controllers/Api/UserTimezoneControllerTest.php, tests/Feature/Controllers/Api/UserTranslationLanguageControllerTest.php |
Tests preference updates, validation, clearing values, response fields, and signed requests. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Other
Possibly related PRs
- dev-null-sh/dev-null.sh#829: Adds the commit pin and unpin endpoints covered by these tests.
- dev-null-sh/dev-null.sh#1156: Changes the user identity contract used by the device, user-search, and mention-suggestion endpoint tests.
Suggested reviewers: nunomaduro, simonhamp
Merge Risk: 
Minimal · up to 7cf84
-
No merge-blocking issue is established. Run the normal test suite before merging.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "test: cover the API endpoints added without tests" matches the changeset. All the files add feature tests for API endpoints (pins, restoration, translation, search, suggestions, scheduled commits, devices, settings, timezone, and translation language). The PR makes no application-code changes, and the title says so through the "test:" prefix. It names the main change without a file list, and it is specific enough for a teammate scanning history to understand the change.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 14 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
752f4f3 added 14 API endpoints to production without tests, so coverage fell to 98% and every
testsrun since has failed the exact-100% gate.This adds feature tests for pins, restoration, translation, commit and user search, mention and issue suggestions, scheduled commits, devices, and the settings, timezone and translation preferences. No app code changes.
Summary by CodeRabbit