MCPcopy Index your code
hub / github.com/git-bug/git-bug / rateLimitingError

Function rateLimitingError

bridge/github/import_integration_test.go:86–94  ·  view source on GitHub ↗
(mock *mocks.Client)

Source from the content-addressed store, hash-verified

84}
85
86func rateLimitingError(mock *mocks.Client) {
87 mock.On("Query", m.Anything, m.AnythingOfType("*github.issueQuery"), m.Anything).Return(errors.New("API rate limit exceeded")).Once()
88 mock.On("Query", m.Anything, m.AnythingOfType("*github.rateLimitQuery"), m.Anything).Return(nil).Run(
89 func(args m.Arguments) {
90 retVal := args.Get(1).(*rateLimitQuery)
91 retVal.RateLimit.ResetAt.Time = time.Now().Add(time.Millisecond * 200)
92 },
93 ).Once()
94}
95
96func expectIssueQuery1(mock *mocks.Client) {
97 mock.On("Query", m.Anything, m.AnythingOfType("*github.issueQuery"), m.Anything).Return(nil).Run(

Callers 1

setupExpectationsFunction · 0.85

Calls 4

RunMethod · 0.80
GetMethod · 0.80
AddMethod · 0.80
NewMethod · 0.45

Tested by

no test coverage detected