Skip to content

test(e2e): declare request identities explicitly#2004

Merged
sang-neo03 merged 2 commits into
larksuite:mainfrom
yxzhaao:fix/e2e-explicit-request-identities
Jul 22, 2026
Merged

test(e2e): declare request identities explicitly#2004
sang-neo03 merged 2 commits into
larksuite:mainfrom
yxzhaao:fix/e2e-explicit-request-identities

Conversation

@yxzhaao

@yxzhaao yxzhaao commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

  • Change 1
  • Change 2

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark-cli <domain> <command> flow works as expected

Related Issues

  • None

Summary by CodeRabbit

  • Tests
    • Updated end-to-end test command requests to explicitly use the correct default execution context, aligning bot and user workflows.
    • Improved document-fetch coverage in the create-and-fetch workflow.
    • Expanded OKR end-to-end scenarios to consistently verify cycle details and operations like reordering and weighting.
    • Added a safety guard to skip a batch-update end-to-end test when the required tenant access token isn’t available.

@github-actions github-actions Bot added the size/S Low-risk docs, CI, test, or chore only changes label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 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

Run ID: c416571b-ed50-4fe8-a885-186d0ae9d0ec

📥 Commits

Reviewing files that changed from the base of the PR and between e664618 and 95d3a6b.

📒 Files selected for processing (1)
  • tests/cli_e2e/base/base_record_batch_update_workflow_test.go

📝 Walkthrough

Walkthrough

The E2E tests now set explicit clie2e.Request.DefaultAs values for Docs and OKR commands, and skip the per-record batch-update workflow when tenant access credentials are unavailable.

Changes

E2E test stability

Layer / File(s) Summary
Explicit request identities
tests/cli_e2e/docs/docs_create_fetch_test.go, tests/cli_e2e/okr/okr_shortcuts_test.go
Docs bot fetch requests use defaultAs; OKR setup, cleanup, mutation, and verification requests use "user".
Tenant token gating
tests/cli_e2e/base/base_record_batch_update_workflow_test.go
The per-record batch-update test skips before setup when no tenant access token is available.

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

Possibly related PRs

Suggested labels: domain/base

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is just the template placeholder text and lacks an actual summary, changes, test plan, and issue context. Fill in the Summary, Changes, Test Plan, and Related Issues sections with concrete details about the test updates and validation.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: making request identities explicit in e2e tests.
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 commented Jul 22, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@95d3a6bc17a3ec22eaa422c067925e02105b18d2

🧩 Skill update

npx skills add yxzhaao/cli#fix/e2e-explicit-request-identities -y -g

@sang-neo03
sang-neo03 merged commit 8f6f8eb into larksuite:main Jul 22, 2026
21 of 35 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