(t *testing.T)
| 149 | } |
| 150 | |
| 151 | func TestExecutor_ConfigureOutputs_WithLogFile(t *testing.T) { |
| 152 | tmpDir := t.TempDir() |
| 153 | logPath := tmpDir + "/test.log" |
| 154 | |
| 155 | executor := NewExecutor("test", "echo").SetLogPath(logPath) |
| 156 | execCmd := exec.Command("echo") |
| 157 | execCmd.Env = os.Environ() |
| 158 | |
| 159 | logFile, err := executor.createLogFile(execCmd) |
| 160 | if err != nil { |
| 161 | t.Fatalf("unexpected error: %v", err) |
| 162 | } |
| 163 | defer logFile.Close() |
| 164 | |
| 165 | executor.configureOutputs(execCmd, logFile, nil) |
| 166 | |
| 167 | if execCmd.Stdout == nil { |
| 168 | t.Error("stdout should not be nil") |
| 169 | } |
| 170 | if execCmd.Stderr == nil { |
| 171 | t.Error("stderr should not be nil") |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | func TestExecutor_ComposeWriters_Single(t *testing.T) { |
| 176 | executor := NewExecutor("", "") |
nothing calls this directly
no test coverage detected