test: isolate and record remote response release acceptance

This commit is contained in:
2026-09-23 20:47:28 +08:00
parent 7670b222ac
commit 35bd724326
5 changed files with 220 additions and 29 deletions

View File

@@ -234,6 +234,9 @@ func TestResponseTemplateConsumer(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
cmd := exec.CommandContext(ctx, releaseCLI, "api", "generate", "--api", api, "--dir", dir, "--module", "example.com/responseConsumer")
// The framework checkout intentionally enables local development mode.
// Run the installed CLI outside it to exercise remote-only consumption.
cmd.Dir = filepath.Dir(dir)
if output, err := cmd.CombinedOutput(); err != nil {
t.Fatalf("released CLI: %v\n%s", err, output)
}