Skip to content

test: fix bot contact user discovery parameters - #2150

Merged
sang-neo03 merged 1 commit into
larksuite:mainfrom
yxzhaao:fix/contact-bot-user-list-params
Aug 3, 2026
Merged

test: fix bot contact user discovery parameters#2150
sang-neo03 merged 1 commit into
larksuite:mainfrom
yxzhaao:fix/contact-bot-user-list-params

Conversation

@yxzhaao

@yxzhaao yxzhaao commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pass department_id=0 and page_size=10 through the raw API command's structured --params input
  • avoid embedding query parameters in the API path, which is normalized with its query fragment stripped
  • restore deterministic bot contact discovery for the live E2E workflow

Verification

  • go test ./cmd/api -count=1
  • go test ./tests/cli_e2e/contact -run '^TestContact_LookupWorkflowAsBot$' -count=1 -v with the CI TEST_BOT1 tenant credentials\n- live result: both discover_user_via_api_as_bot and get_user_by_open_id_as_bot passed\n

Summary by CodeRabbit

  • Tests
    • Updated the contact lookup end-to-end test to include department filtering and page-size parameters when retrieving users.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a03a396-ba0b-4509-806b-220a759aa11d

📥 Commits

Reviewing files that changed from the base of the PR and between 427cbd6 and 775ac35.

📒 Files selected for processing (1)
  • tests/cli_e2e/contact/contact_lookup_workflow_test.go

📝 Walkthrough

Walkthrough

The contact lookup E2E test now includes department_id: "0" and page_size: 10 in the bot user-discovery request.

Changes

Contact lookup workflow

Layer / File(s) Summary
User discovery query parameters
tests/cli_e2e/contact/contact_lookup_workflow_test.go
The request now filters users by department 0 and limits the result to 10 users.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the test fix for bot contact user discovery parameters.
Description check ✅ Passed The description explains the change and verification steps, although it uses Verification instead of the template's Test Plan heading.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 github-actions Bot added the size/S Low-risk docs, CI, test, or chore only changes label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@775ac359d47fafa2b19d79210e51800716d59b11

🧩 Skill update

npx skills add yxzhaao/cli#fix/contact-bot-user-list-params -y -g

@sang-neo03
sang-neo03 merged commit 2dafa03 into larksuite:main Aug 3, 2026
22 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Low-risk docs, CI, test, or chore only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants