fix: update tests for getCurrentBranchOrHEAD and getPIDFileForSocket
- sync_git_test.go: getCurrentBranchOrHEAD now returns 1 value (not 2) - daemon_basics_test.go: getPIDFileForSocket uses dbPath not socketPath - daemon_autostart.go: mark unused socketPath param with underscore These tests were broken by recent refactors that changed function signatures but didn't update the corresponding test files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -398,9 +398,10 @@ func setupDaemonIO(cmd *exec.Cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
// getPIDFileForSocket returns the PID file path for a given socket path
|
||||
func getPIDFileForSocket(socketPath string) string {
|
||||
// PID file is in .beads directory, not socket directory (socket may be in /tmp for short paths)
|
||||
// getPIDFileForSocket returns the PID file path.
|
||||
// Note: socketPath parameter is unused - PID file is always in .beads directory
|
||||
// (not socket directory, which may be in /tmp for short paths).
|
||||
func getPIDFileForSocket(_ string) string {
|
||||
dir := filepath.Dir(dbPath)
|
||||
return filepath.Join(dir, "daemon.pid")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user