Documentation
¶
Overview ¶
Package plugin_e2e exercises the extension/platform plugin contract the way a real customer does: it builds a fork of lark-cli with a plugin blank-imported, then runs that fork as a subprocess and asserts the real stderr/stdout envelopes and exit codes. This is L4 coverage — the in-process unit and integration tests (extension/..., cmd/...) assert Go error values in the test process and structurally cannot observe envelope serialization, exit codes, or the blank-import -> init -> Register -> InstallAll assembly chain.
Mechanism (the "customer build", mirrors xcaddy's build mode):
- `git archive HEAD` a clean tree containing only committed files (so the fork embeds the tracked meta_data stub, reproducing the bare-module state).
- Generate a customer module: go.mod (cli's requires + `replace` to the archived tree) + go.sum copy + main.go (blank-imports the plugin package) + plugin package (its init() calls platform.Register).
- `go build` the fork (offline-capable via the warm module cache), then run it as a subprocess and assert.
Click to show internal directories.
Click to hide internal directories.