MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / createSession

Function createSession

internal/bridge/transfer_grpc_test.go:39–47  ·  view source on GitHub ↗

createSession creates a session with standard tools and registers it.

(t *testing.T, mgr *sessions.Manager, b *Bridge, key, ua string)

Source from the content-addressed store, hash-verified

37
38// createSession creates a session with standard tools and registers it.
39func createSession(t *testing.T, mgr *sessions.Manager, b *Bridge, key, ua string) *sessions.Session {
40 t.Helper()
41 sess := mgr.Touch(key, ua, "claude", "")
42 sess.RecordToolsDirect(testClaudeTools)
43 b.registered.Store(sess.ID, true)
44 b.notifySessionReady(sess.ID)
45 b.taskManager.StartSessionListener(sess.ID)
46 return sess
47}
48
49// verifyDownloadResponse checks content byte-for-byte, size, and checksum.
50func verifyDownloadResponse(t *testing.T, dl *implantpb.DownloadResponse, originalData []byte) {

Calls 4

TouchMethod · 0.80
RecordToolsDirectMethod · 0.80
notifySessionReadyMethod · 0.80
StartSessionListenerMethod · 0.80

Tested by

no test coverage detected