(t *testing.T)
| 79 | } |
| 80 | |
| 81 | func TestExecutor_CreateLogFileNoPath(t *testing.T) { |
| 82 | executor := NewExecutor("test", "echo") |
| 83 | execCmd := exec.Command("echo") |
| 84 | execCmd.Env = os.Environ() |
| 85 | |
| 86 | logFile, err := executor.createLogFile(execCmd) |
| 87 | if err != nil { |
| 88 | t.Fatalf("unexpected error: %v", err) |
| 89 | } |
| 90 | if logFile != nil { |
| 91 | t.Fatal("expected nil log file when logPath is empty") |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | func TestExecutor_CreateLogFileWithEnv(t *testing.T) { |
| 96 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected