Tmux capture-pane tests fail in Docker CI containers #304

Closed
opened 2026-03-22 11:46:14 +00:00 by mprihoda · 1 comment
mprihoda commented 2026-03-22 11:46:14 +00:00 (Migrated from github.com)

Problem

Tests in open-prompt.bats and start-prompt.bats that use tmux capture-pane to verify send-keys content fail when running inside Docker containers. The pane content is empty because there's no real terminal attached.

Affected Tests

  • open-prompt.bats: tests 2, 3, 7, 8, 9
  • start-prompt.bats: tests 2, 6, 7, 8

These are currently skipped in Docker with is_docker && skip.

Possible Solutions

  1. Allocate a pseudo-terminal in the Docker container (e.g., docker run -t)
  2. Increase sleep time before capture-pane — the content might appear with longer delays
  3. Use a different verification approach — e.g., write tmux output to a file instead of relying on capture-pane
  4. Use tmux pipe-pane to capture output to a file, then assert on the file contents

Context

Introduced when moving CI to self-hosted runner with Docker containers (IW-292).

## Problem Tests in `open-prompt.bats` and `start-prompt.bats` that use `tmux capture-pane` to verify `send-keys` content fail when running inside Docker containers. The pane content is empty because there's no real terminal attached. ## Affected Tests - `open-prompt.bats`: tests 2, 3, 7, 8, 9 - `start-prompt.bats`: tests 2, 6, 7, 8 These are currently skipped in Docker with `is_docker && skip`. ## Possible Solutions 1. **Allocate a pseudo-terminal** in the Docker container (e.g., `docker run -t`) 2. **Increase sleep time** before `capture-pane` — the content might appear with longer delays 3. **Use a different verification approach** — e.g., write tmux output to a file instead of relying on `capture-pane` 4. **Use `tmux pipe-pane`** to capture output to a file, then assert on the file contents ## Context Introduced when moving CI to self-hosted runner with Docker containers (IW-292).
mprihoda commented 2026-06-10 20:43:43 +00:00 (Migrated from github.com)

Closing as superseded. PTY-dependent tmux assertions moved to the tool contract suite in Phase 2.7 (test/contract/tmux_adapter_contract.bats), explicitly gated by IW_CONTRACT_TMUX=1 so Docker CI doesn't run them by default. The remaining smoke tests in open-prompt.bats and start-prompt.bats were refactored to assert on session existence and stderr text instead of pane content, so they pass cleanly in Docker without skip logic. The leftover is_docker() helper is dead and will be removed.

Closing as superseded. PTY-dependent tmux assertions moved to the tool contract suite in Phase 2.7 (`test/contract/tmux_adapter_contract.bats`), explicitly gated by `IW_CONTRACT_TMUX=1` so Docker CI doesn't run them by default. The remaining smoke tests in `open-prompt.bats` and `start-prompt.bats` were refactored to assert on session existence and stderr text instead of pane content, so they pass cleanly in Docker without skip logic. The leftover `is_docker()` helper is dead and will be removed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#304
No description provided.