Helper function to run commands in a specific directory
(cmd []string, dir string)
| 172 | |
| 173 | // Helper function to run commands in a specific directory |
| 174 | func runCommandInDir(cmd []string, dir string) error { |
| 175 | if len(cmd) == 0 { |
| 176 | return nil |
| 177 | } |
| 178 | command := cmd[0] |
| 179 | args := cmd[1:] |
| 180 | |
| 181 | c := exec.Command(command, args...) |
| 182 | c.Dir = dir |
| 183 | return c.Run() |
| 184 | } |
| 185 | |
| 186 | func TestFileTracker_RollbackAllFiles(t *testing.T) { |
| 187 | // Create a temporary directory for testing |
no test coverage detected