You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add timeout exit code for wait polling (PRINFRA-125) (#46)
## Description
This follows the merged --wait polling framework with a clearer timeout contract for agents and scripts. Poll timeouts now return exit code 4 only after resource creation is confirmed, emit partial resource data on stdout when available, keep cancel distinct from timeout, and surface command-specific follow-up hints such as manual get commands for the created resource.
## Testing
- go test ./internal/client/... -run "ExecuteAndPoll|ExtractJSONPath" -count=1
- go test ./cmd/heygen/... -run "VideoCreate_Wait|VideoAgentCreate_Wait|GeneratedRoot_RootHelp" -count=1
- go test ./...
- All automated tests use `httptest.Server`. No real API calls in tests or CI.
80
80
- Command tests: use `runCommand()` in `cmd/heygen/testutil_test.go`. It creates a fresh Cobra tree, captures stdout/stderr/exit code, and renders errors through the formatter (same path as `main()`).
81
81
- Use `t.Setenv()` for env vars (auto-restored).
82
-
- Assert on exit codes (0/1/2/3) **and** stderr envelope shape, not just error presence.
82
+
- Assert on exit codes (0/1/2/3/4) **and** stderr envelope shape, not just error presence.
- All automated tests use `httptest.Server`. No real API calls in tests or CI.
78
78
- Command tests: use `runCommand()` in `cmd/heygen/testutil_test.go`. It creates a fresh Cobra tree, captures stdout/stderr/exit code, and renders errors through the formatter (same path as `main()`).
79
79
- Use `t.Setenv()` for env vars (auto-restored).
80
-
- Assert on exit codes (0/1/2/3) **and** stderr envelope shape, not just error presence.
80
+
- Assert on exit codes (0/1/2/3/4) **and** stderr envelope shape, not just error presence.
0 commit comments