ReadWorktreeFile reads directly from an environment's worktree
(envID, path string)
| 312 | |
| 313 | // ReadWorktreeFile reads directly from an environment's worktree |
| 314 | func (u *UserActions) ReadWorktreeFile(envID, path string) string { |
| 315 | worktreePath := u.WorktreePath(envID) |
| 316 | fullPath := filepath.Join(worktreePath, path) |
| 317 | content, err := os.ReadFile(fullPath) |
| 318 | require.NoError(u.t, err, "Failed to read worktree file") |
| 319 | return string(content) |
| 320 | } |
| 321 | |
| 322 | // CorruptWorktree simulates worktree corruption for recovery testing |
| 323 | func (u *UserActions) CorruptWorktree(envID string) { |
nothing calls this directly
no test coverage detected