MCPcopy Index your code
hub / github.com/coder/coder / TestPathStore_GetPaths_DeduplicatedSorted

Function TestPathStore_GetPaths_DeduplicatedSorted

agent/agentgit/pathstore_test.go:50–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestPathStore_GetPaths_DeduplicatedSorted(t *testing.T) {
51 t.Parallel()
52
53 ps := agentgit.NewPathStore()
54 chatID := uuid.New()
55
56 ps.AddPaths([]uuid.UUID{chatID}, []string{"/z", "/a", "/m", "/a", "/z"})
57 ps.AddPaths([]uuid.UUID{chatID}, []string{"/a", "/b"})
58
59 got := ps.GetPaths(chatID)
60 require.Equal(t, []string{"/a", "/b", "/m", "/z"}, got)
61}
62
63func TestPathStore_Subscribe_ReceivesNotification(t *testing.T) {
64 t.Parallel()

Callers

nothing calls this directly

Calls 5

AddPathsMethod · 0.95
GetPathsMethod · 0.95
NewPathStoreFunction · 0.92
NewMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected