mirror of
https://github.com/harness/drone.git
synced 2025-05-03 13:20:18 +08: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
39 lines
898 B
Go
39 lines
898 B
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Transactor is a mock of dbtx.Transactor interface.
|
|
type Transactor struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// WithTx provides a mock function
|
|
func (m *Transactor) WithTx(ctx context.Context, fn func(context.Context) error, opts ...interface{}) error {
|
|
args := m.Called(ctx, fn, opts)
|
|
return args.Error(0)
|
|
}
|
|
|
|
// BeginTx provides a mock function
|
|
func (m *Transactor) BeginTx(ctx context.Context) (context.Context, error) {
|
|
args := m.Called(ctx)
|
|
return args.Get(0).(context.Context), args.Error(1)
|
|
}
|
|
|
|
// CommitTx provides a mock function
|
|
func (m *Transactor) CommitTx(ctx context.Context) error {
|
|
args := m.Called(ctx)
|
|
return args.Error(0)
|
|
}
|
|
|
|
// RollbackTx provides a mock function
|
|
func (m *Transactor) RollbackTx(ctx context.Context) error {
|
|
args := m.Called(ctx)
|
|
return args.Error(0)
|
|
}
|