From 59071dd8efa5ffb7a355bf54a9e9efcc0e2b6152 Mon Sep 17 00:00:00 2001 From: stonezdj Date: Thu, 23 May 2024 05:21:43 -0400 Subject: [PATCH] fix issue --- src/testing/pkg/scan/sbom/manager.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/testing/pkg/scan/sbom/manager.go b/src/testing/pkg/scan/sbom/manager.go index 082103f2b64a..464e821ef922 100644 --- a/src/testing/pkg/scan/sbom/manager.go +++ b/src/testing/pkg/scan/sbom/manager.go @@ -98,9 +98,9 @@ func (_m *Manager) DeleteByExtraAttr(ctx context.Context, mimeType string, attrN return r0 } -// GetBy provides a mock function with given fields: ctx, artifactID, registrationUUID, mimeTypes -func (_m *Manager) GetBy(ctx context.Context, artifactID int64, registrationUUID string, mimeTypes []string) ([]*model.Report, error) { - ret := _m.Called(ctx, artifactID, registrationUUID, mimeTypes) +// GetBy provides a mock function with given fields: ctx, artifactID, registrationUUID, mimeType, mediaType +func (_m *Manager) GetBy(ctx context.Context, artifactID int64, registrationUUID string, mimeType string, mediaType string) ([]*model.Report, error) { + ret := _m.Called(ctx, artifactID, registrationUUID, mimeType, mediaType) if len(ret) == 0 { panic("no return value specified for GetBy") @@ -108,19 +108,19 @@ func (_m *Manager) GetBy(ctx context.Context, artifactID int64, registrationUUID var r0 []*model.Report var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, string, []string) ([]*model.Report, error)); ok { - return rf(ctx, artifactID, registrationUUID, mimeTypes) + if rf, ok := ret.Get(0).(func(context.Context, int64, string, string, string) ([]*model.Report, error)); ok { + return rf(ctx, artifactID, registrationUUID, mimeType, mediaType) } - if rf, ok := ret.Get(0).(func(context.Context, int64, string, []string) []*model.Report); ok { - r0 = rf(ctx, artifactID, registrationUUID, mimeTypes) + if rf, ok := ret.Get(0).(func(context.Context, int64, string, string, string) []*model.Report); ok { + r0 = rf(ctx, artifactID, registrationUUID, mimeType, mediaType) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Report) } } - if rf, ok := ret.Get(1).(func(context.Context, int64, string, []string) error); ok { - r1 = rf(ctx, artifactID, registrationUUID, mimeTypes) + if rf, ok := ret.Get(1).(func(context.Context, int64, string, string, string) error); ok { + r1 = rf(ctx, artifactID, registrationUUID, mimeType, mediaType) } else { r1 = ret.Error(1) }