mirror of
https://github.com/harness/drone.git
synced 2025-05-03 14:22:38 +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
43 lines
902 B
Go
43 lines
902 B
Go
// Code generated by testify. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/harness/gitness/audit"
|
|
"github.com/harness/gitness/types"
|
|
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// AuditService is a mock of audit.Service interface.
|
|
type AuditService struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Log provides a mock function
|
|
func (m *AuditService) Log(
|
|
ctx context.Context,
|
|
user types.Principal,
|
|
resource audit.Resource,
|
|
action audit.Action,
|
|
spacePath string,
|
|
options ...audit.Option,
|
|
) error {
|
|
args := []interface{}{ctx, user, resource, action, spacePath}
|
|
for _, opt := range options {
|
|
args = append(args, opt)
|
|
}
|
|
ret := m.Called(args...)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, types.Principal, audit.Resource, audit.Action, string, ...audit.Option) error); ok {
|
|
r0 = rf(ctx, user, resource, action, spacePath, options...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|