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

Method ListSessionsByResourceID

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

ListSessionsByResourceID calls ListSessionsByResourceIDFunc.

(ctx context.Context, resourceType string, resourceID int64, limit int)

Source from the content-addressed store, hash-verified

404
405// ListSessionsByResourceID calls ListSessionsByResourceIDFunc.
406func (mock *CapiClientMock) ListSessionsByResourceID(ctx context.Context, resourceType string, resourceID int64, limit int) ([]*Session, error) {
407 if mock.ListSessionsByResourceIDFunc == nil {
408 panic("CapiClientMock.ListSessionsByResourceIDFunc: method is nil but CapiClient.ListSessionsByResourceID was just called")
409 }
410 callInfo := struct {
411 Ctx context.Context
412 ResourceType string
413 ResourceID int64
414 Limit int
415 }{
416 Ctx: ctx,
417 ResourceType: resourceType,
418 ResourceID: resourceID,
419 Limit: limit,
420 }
421 mock.lockListSessionsByResourceID.Lock()
422 mock.calls.ListSessionsByResourceID = append(mock.calls.ListSessionsByResourceID, callInfo)
423 mock.lockListSessionsByResourceID.Unlock()
424 return mock.ListSessionsByResourceIDFunc(ctx, resourceType, resourceID, limit)
425}
426
427// ListSessionsByResourceIDCalls gets all the calls that were made to ListSessionsByResourceID.
428// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected