mockSession builds a Session with tools pre-populated for testing.
(userAgent string, tools []observedtools.ObservedTool)
| 256 | |
| 257 | // mockSession builds a Session with tools pre-populated for testing. |
| 258 | func mockSession(userAgent string, tools []observedtools.ObservedTool) *Session { |
| 259 | s := &Session{ |
| 260 | ID: "test-session", |
| 261 | UserAgent: userAgent, |
| 262 | Tools: tools, |
| 263 | subscribers: make(map[string]chan *CommandResult), |
| 264 | observers: make(map[string]chan *ObserveEvent), |
| 265 | } |
| 266 | s.Agent = detectAgent(tools) |
| 267 | return s |
| 268 | } |
| 269 | |
| 270 | // =================================================================== |
| 271 | // A. Binary Detection Tests |
no test coverage detected