MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestReadPIDInvalidContent

Function TestReadPIDInvalidContent

watch/state_more_test.go:133–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

131}
132
133func TestReadPIDInvalidContent(t *testing.T) {
134 root := t.TempDir()
135 codemapDir := filepath.Join(root, ".codemap")
136 if err := os.MkdirAll(codemapDir, 0o755); err != nil {
137 t.Fatal(err)
138 }
139 if err := os.WriteFile(filepath.Join(codemapDir, "watch.pid"), []byte("not-a-number"), 0o644); err != nil {
140 t.Fatal(err)
141 }
142
143 if _, err := ReadPID(root); err == nil {
144 t.Fatal("expected parse error for invalid pid file content")
145 }
146}
147
148func TestIsOwnedDaemonInvalidPIDInputs(t *testing.T) {
149 tests := []struct {

Callers

nothing calls this directly

Calls 1

ReadPIDFunction · 0.85

Tested by

no test coverage detected