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

Function TestSubscribeEmptyPaths

agent/agentgit/agentgit_test.go:105–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

103}
104
105func TestSubscribeEmptyPaths(t *testing.T) {
106 t.Parallel()
107
108 logger := slogtest.Make(t, nil)
109 h := agentgit.NewHandler(logger)
110
111 added := h.Subscribe([]string{})
112 require.False(t, added, "empty slice should not add any repos")
113
114 added = h.Subscribe(nil)
115 require.False(t, added, "nil slice should not add any repos")
116
117 ctx := context.Background()
118 msg := h.Scan(ctx)
119 require.Nil(t, msg, "scan should return nil with no repos")
120}
121
122func TestScanReturnsRepoChanges(t *testing.T) {
123 t.Parallel()

Callers

nothing calls this directly

Calls 3

SubscribeMethod · 0.95
ScanMethod · 0.95
NewHandlerFunction · 0.92

Tested by

no test coverage detected