mirror of
https://github.com/harness/drone.git
synced 2025-05-05 15:32:56 +00:00
* fix merge conflicts * fix merge conflicts * fix review comment * fix review comment * fix review comment * fix: [AH-771]: gitness unit test refactoring * fix: [AH-771]: resolved review comments * fix: [AH-771]: resolved review comments * fix: [AH-771] Registry test refactoring and improvements - Refactored registry metadata test implementations - Improved code organization and readability - Fixed line length issues in test files - Removed unused fields from request.go - Added proper license headers - Fixed linting issues in mock files - Simplified test setup and assertions - Updated wire generation for cmd package - Added nolint:exhaustive directive for package type switch fix: [AH-771] Registry test refactoring and improvements - Refactored registry metadata test implementations - Improved code organization and readability - Fixed line length issues in test files - Removed unused fields from request.go - Added proper license headers - Fixed linting issues in mock files - Simplifi
34 lines
762 B
Go
34 lines
762 B
Go
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Transaction is an autogenerated mock type for the Transaction type
|
|
type Transaction struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// WithTx provides a mock function with given fields: ctx, fn, options
|
|
func (m *Transaction) WithTx(ctx context.Context, fn func(context.Context) error, options ...interface{}) error {
|
|
var args []interface{}
|
|
args = append(args, ctx, fn)
|
|
for _, opt := range options {
|
|
args = append(args, opt)
|
|
}
|
|
ret := m.Called(args...)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, func(context.Context) error, ...interface{}) error); ok {
|
|
r0 = rf(ctx, fn, options...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|