Documentation
¶
Overview ¶
Package registrytest seeds the registry with a tracked metadata fixture so command-tree tests pass on a clean checkout — no `make fetch_meta`, no network, no user cache. TestMain funcs of packages that build service commands call Seed after redirecting LARKSUITE_CLI_CONFIG_DIR.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Seed ¶
Seed writes fixtureMetaJSON into the registry remote-meta cache under LARKSUITE_CLI_CONFIG_DIR and eagerly initializes the registry. testRoot must be the temporary root created by the caller's TestMain; Seed rejects a config directory outside it before performing any write. The cache meta is stamped fresh so Init never sync-fetches or background-refreshes over the network. Eager Init pins the catalog for the whole test process before any individual test can re-point LARKSUITE_CLI_CONFIG_DIR elsewhere.
The caller's TestMain must set LARKSUITE_CLI_CONFIG_DIR beneath testRoot first; Seed refuses unset, mismatched, or escaping paths so it can never write into a developer's real ~/.lark-cli.
Types ¶
This section is empty.