plugin_e2e

package
v1.0.71 Latest Latest
Warning

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

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

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):

  1. `git archive HEAD` a clean tree containing only committed files (so the fork embeds the tracked meta_data stub, reproducing the bare-module state).
  2. 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).
  3. `go build` the fork (offline-capable via the warm module cache), then run it as a subprocess and assert.

Jump to

Keyboard shortcuts

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