MM-23038: Compliance Report Fixes (#14242)

* add warning count as return value

* add warning count as return value

* fix file name

* update mock

* add setting warning to db

* replace wrongly removed string

* add dummy function to see if it will build

* remove dummy function

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Scott Bishel
2020-05-07 14:12:47 -06:00
committed by GitHub
parent bdd0e9febb
commit 1031e27fd8
6 changed files with 35 additions and 11 deletions

View File

@@ -11,5 +11,5 @@ import (
type MessageExportInterface interface {
StartSynchronizeJob(ctx context.Context, exportFromTimestamp int64) (*model.Job, *model.AppError)
RunExport(format string, since int64) *model.AppError
RunExport(format string, since int64) (int64, *model.AppError)
}

View File

@@ -18,19 +18,26 @@ type MessageExportInterface struct {
}
// RunExport provides a mock function with given fields: format, since
func (_m *MessageExportInterface) RunExport(format string, since int64) *model.AppError {
func (_m *MessageExportInterface) RunExport(format string, since int64) (int64, *model.AppError) {
ret := _m.Called(format, since)
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, int64) *model.AppError); ok {
var r0 int64
if rf, ok := ret.Get(0).(func(string, int64) int64); ok {
r0 = rf(format, since)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.AppError)
r0 = ret.Get(0).(int64)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, int64) *model.AppError); ok {
r1 = rf(format, since)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0
return r0, r1
}
// StartSynchronizeJob provides a mock function with given fields: ctx, exportFromTimestamp