(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestBashTimeout(t *testing.T) { |
| 121 | out := Bash(context.Background(), "sleep 2", 100*time.Millisecond) |
| 122 | if !strings.Contains(out, "timeout") { |
| 123 | t.Fatalf("expected timeout marker: %q", out) |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | func TestBashCustomTimeoutHonored(t *testing.T) { |
| 128 | // timeout_seconds of 1 truncates the 3s sleep, and flows through to Bash. |