MCPcopy Create free account
hub / github.com/cli/cli / GetSession

Method GetSession

pkg/cmd/agent-task/capi/client_mock.go:298–313  ·  view source on GitHub ↗

GetSession calls GetSessionFunc.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

296
297// GetSession calls GetSessionFunc.
298func (mock *CapiClientMock) GetSession(ctx context.Context, id string) (*Session, error) {
299 if mock.GetSessionFunc == nil {
300 panic("CapiClientMock.GetSessionFunc: method is nil but CapiClient.GetSession was just called")
301 }
302 callInfo := struct {
303 Ctx context.Context
304 ID string
305 }{
306 Ctx: ctx,
307 ID: id,
308 }
309 mock.lockGetSession.Lock()
310 mock.calls.GetSession = append(mock.calls.GetSession, callInfo)
311 mock.lockGetSession.Unlock()
312 return mock.GetSessionFunc(ctx, id)
313}
314
315// GetSessionCalls gets all the calls that were made to GetSession.
316// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected