[MM-25652] Add /integrity endpoint to local mode API (#15033)
* Fix direct/group channel false positives * Move public structures to model package * Expose CheckIntegrity as a local API method * Remove extra file Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c0fa478cdd
Коммит
e5edf2683d
@@ -7,9 +7,11 @@ package mocks
|
||||
import (
|
||||
context "context"
|
||||
|
||||
store "github.com/mattermost/mattermost-server/v5/store"
|
||||
model "github.com/mattermost/mattermost-server/v5/model"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
store "github.com/mattermost/mattermost-server/v5/store"
|
||||
|
||||
time "time"
|
||||
)
|
||||
|
||||
@@ -83,15 +85,15 @@ func (_m *Store) ChannelMemberHistory() store.ChannelMemberHistoryStore {
|
||||
}
|
||||
|
||||
// CheckIntegrity provides a mock function with given fields:
|
||||
func (_m *Store) CheckIntegrity() <-chan store.IntegrityCheckResult {
|
||||
func (_m *Store) CheckIntegrity() <-chan model.IntegrityCheckResult {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 <-chan store.IntegrityCheckResult
|
||||
if rf, ok := ret.Get(0).(func() <-chan store.IntegrityCheckResult); ok {
|
||||
var r0 <-chan model.IntegrityCheckResult
|
||||
if rf, ok := ret.Get(0).(func() <-chan model.IntegrityCheckResult); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(<-chan store.IntegrityCheckResult)
|
||||
r0 = ret.Get(0).(<-chan model.IntegrityCheckResult)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
"github.com/mattermost/mattermost-server/v5/store"
|
||||
"github.com/mattermost/mattermost-server/v5/store/storetest/mocks"
|
||||
"github.com/stretchr/testify/mock"
|
||||
@@ -94,8 +95,8 @@ func (s *Store) TotalMasterDbConnections() int { return 1 }
|
||||
func (s *Store) TotalReadDbConnections() int { return 1 }
|
||||
func (s *Store) TotalSearchDbConnections() int { return 1 }
|
||||
func (s *Store) GetCurrentSchemaVersion() string { return "" }
|
||||
func (s *Store) CheckIntegrity() <-chan store.IntegrityCheckResult {
|
||||
return make(chan store.IntegrityCheckResult)
|
||||
func (s *Store) CheckIntegrity() <-chan model.IntegrityCheckResult {
|
||||
return make(chan model.IntegrityCheckResult)
|
||||
}
|
||||
|
||||
func (s *Store) AssertExpectations(t mock.TestingT) bool {
|
||||
|
||||
Ссылка в новой задаче
Block a user