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

Method CreateSubscription

pkg/cmd/event/client/client_mock.go:107–124  ·  view source on GitHub ↗

CreateSubscription calls CreateSubscriptionFunc.

(ctx context.Context, resourceURL string, eventTypes []string)

Source from the content-addressed store, hash-verified

105
106// CreateSubscription calls CreateSubscriptionFunc.
107func (mock *EventClientMock) CreateSubscription(ctx context.Context, resourceURL string, eventTypes []string) (*Subscription, bool, error) {
108 if mock.CreateSubscriptionFunc == nil {
109 panic("EventClientMock.CreateSubscriptionFunc: method is nil but EventClient.CreateSubscription was just called")
110 }
111 callInfo := struct {
112 Ctx context.Context
113 ResourceURL string
114 EventTypes []string
115 }{
116 Ctx: ctx,
117 ResourceURL: resourceURL,
118 EventTypes: eventTypes,
119 }
120 mock.lockCreateSubscription.Lock()
121 mock.calls.CreateSubscription = append(mock.calls.CreateSubscription, callInfo)
122 mock.lockCreateSubscription.Unlock()
123 return mock.CreateSubscriptionFunc(ctx, resourceURL, eventTypes)
124}
125
126// CreateSubscriptionCalls gets all the calls that were made to CreateSubscription.
127// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected