Verified Commit 929ed78c authored by Jaime Martinez's avatar Jaime Martinez 🔴
Browse files

Update mockery tool and mocs

parent 03432dab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ mocks-check: mocks
	fi;

# development tools
MOCKERY_VERSION ?= 2.10.4
MOCKERY_VERSION ?= 2.33.2
MOCKERY ?= ${CURDIR}/bin/mockery-$(MOCKERY_VERSION)

mocks: $(MOCKERY)
+19 −2
Original line number Diff line number Diff line
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.33.2. DO NOT EDIT.

package gitlab

@@ -18,6 +18,10 @@ func (_m *MockHTTPClient) Do(_a0 *http.Request) (*http.Response, error) {
	ret := _m.Called(_a0)

	var r0 *http.Response
	var r1 error
	if rf, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
		r0 = rf(_a0)
	} else {
@@ -26,7 +30,6 @@ func (_m *MockHTTPClient) Do(_a0 *http.Request) (*http.Response, error) {
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*http.Request) error); ok {
		r1 = rf(_a0)
	} else {
@@ -35,3 +38,17 @@ func (_m *MockHTTPClient) Do(_a0 *http.Request) (*http.Response, error) {

	return r0, r1
}

// NewMockHTTPClient creates a new instance of MockHTTPClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockHTTPClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHTTPClient {
	mock := &MockHTTPClient{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}