mirror of
https://github.com/larksuite/cli.git
synced 2026-07-08 02:00:19 +08:00
Address PR #1735 review: - omit-empty: when --environment is unset, drop the env query key entirely instead of sending env="" — matches the family's omit-empty convention (cf. page_token) and miaoda-cli's "no dbBranch when unset". Add dbEnvParams helper; apply across all db shortcuts (execute, table-list/-get, quota-get, changelog-list, audit-list/-set/-status, data-export/-import) plus the export/import query params, queryExportTotal and audit-list table/status probes. - e2e dry-run assertions pin env is omitted via .Exists() (was Equal ""). - skill doc (lark-apps-db): rewrite the --environment guidance from an agent's decision POV — read vs write, single-env writes hit online prod, explicit dev on single-env as a probe; drop redundant/changelog phrasing.
CLI E2E Tests
This directory contains end-to-end tests for lark-cli.
The purpose of this module is to verify real CLI workflows from a user-facing perspective: run the compiled binary, execute commands end to end, and catch regressions that are not obvious from unit tests alone.
What Is Here
core.go,core_test.go: the shared E2E test harness and its own testsdemo/: reference testcase(s)cli-e2e-testcase-writer/: the local skill for adding or updating testcase files in this module
For Contributors
When writing or updating testcases under tests/cli_e2e, install and use this skill first:
npx skills add ./tests/cli_e2e/cli-e2e-testcase-writer
Then follow tests/cli_e2e/cli-e2e-testcase-writer/SKILL.md.
Example prompt:
Use $cli-e2e-testcase-writer to write lark-cli xxx domain related testcases.
Put them under tests/cli_e2e/xxx.
Run
make build
go test ./tests/cli_e2e/... -count=1