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

Function TestSessionFilePath_ValidID

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

SessionFilePathFunction · 0.85
encodeRepoPathFunction · 0.85

Tested by

no test coverage detected