registrytest

package
v1.0.76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 10 Imported by: 0

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

func Seed(testRoot string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL