MCPcopy Create free account
hub / github.com/alibaba/open-code-review / TestSessionFilePath_ValidID

Function TestSessionFilePath_ValidID

internal/session/resume_test.go:21–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestSessionFilePath_ValidID(t *testing.T) {
22 tmpHome := t.TempDir()
23 t.Setenv("HOME", tmpHome)
24
25 path, err := SessionFilePath("/some/repo", "abc-123")
26 if err != nil {
27 t.Fatalf("unexpected error: %v", err)
28 }
29
30 expectedSuffix := filepath.Join("test-sessions", encodeRepoPath("/some/repo"), "abc-123.jsonl")
31 if !contains(path, expectedSuffix) {
32 t.Errorf("path %q does not contain expected suffix %q", path, expectedSuffix)
33 }
34}
35
36// --- ResumeState.CompletedCount ---
37

Callers

nothing calls this directly

Calls 3

SessionFilePathFunction · 0.85
encodeRepoPathFunction · 0.85
containsFunction · 0.85

Tested by

no test coverage detected