Skip to content

test(api): probe the session and document helpers of ApiController - #26281

Merged
antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
antobinary:test-400-api-controller-helper-probes
Oct 28, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
antobinary:test-400-api-controller-helper-probes

Conversation

@antobinary

Copy link
Copy Markdown
Member

What does this PR do?

Extends controllerHelpersNotReachable (bigbluebutton-tests/playwright/api/api.ts) with four more private helpers of ApiController: handleJoinExistingUser, getUserSession, sanitizeSessionToken and uploadDocuments. Each must answer 404 through the generic /bigbluebutton/$controller/$action mapping.

Closes Issue(s)

Closes #

Motivation

Grails turns every public method of a controller into an action. The test probed four helpers; these four handle sessions and documents and were not among them. A refactor that makes one of them public again now fails the gate.

How to test

cd bigbluebutton-tests/playwright && npx playwright test api/api.spec.ts -g controllerHelpersNotReachable --project=chromium, about 2 s. Passes against 4.0 develop.

controllerHelpersNotReachable checked four private helpers through the
generic controller/action mapping. Add the helpers that handle sessions
and documents (handleJoinExistingUser, getUserSession,
sanitizeSessionToken, uploadDocuments), so a refactor that makes one of
them public again fails the test.
@antobinary antobinary added this to the Release 4.0 milestone Oct 28, 2026
@antobinary
antobinary requested a review from paultrudel October 28, 2026 14:33
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 119e73a1-2731-413d-9404-8745d32ce058
Commits

Reviewing files that changed from the base of the PR and between 4d27ec6 and 6dafc9d.

Files selected for processing: 1
  • bigbluebutton-tests/playwright/api/api.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

Walkthrough

The controller-helper reachability test now checks that handleJoinExistingUser, getUserSession, sanitizeSessionToken, and uploadDocuments URLs return 404. Its comment identifies session and document helpers as methods that must remain private.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: Minimal · up to 6dafc

The targeted reachability checks are correctly wired and introduce no established merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: testing the session and document helpers of ApiController.
Description check Passed The description directly explains the four added private helpers, the expected 404 behavior, the motivation, and the validation command.
Docstring Coverage Passed 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. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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 1 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚨 Automated tests failed

@antobinary
antobinary merged commit 25632c4 into bigbluebutton:v4.0.x-develop Oct 28, 2026
32 of 34 checks passed
@antobinary
antobinary deleted the test-400-api-controller-helper-probes branch October 28, 2026 16:54
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.

2 participants