(t *testing.T)
| 206 | } |
| 207 | |
| 208 | func TestExecutor_WithRetry_RetriesOnFailure(t *testing.T) { |
| 209 | executor := NewExecutor("[test retry]", "false").WithRetry(3) |
| 210 | err := executor.Execute() |
| 211 | if err == nil { |
| 212 | t.Fatal("expected error from failing command") |
| 213 | } |
| 214 | if !strings.Contains(err.Error(), "failed after 3 attempts") { |
| 215 | t.Errorf("error should mention 'failed after 3 attempts', got: %v", err) |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | func TestExecutor_WithRetry_NoRetryWhenZero(t *testing.T) { |
| 220 | executor := NewExecutor("[test]", "false") // no WithRetry |
nothing calls this directly
no test coverage detected