mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6976: Elasticsearch capitalisation and tests. (#6839)
* Fixes Elasticsearch to have consistent capitalisation everywhere across the code and UI (except the config file unfortunately). * Adds basic unit tests for Elastichsearch. * Adds a Elasticsearch docker image to the Makefile to enable testing the Elasticsearch feature.
This commit is contained in:
@@ -5,20 +5,20 @@ package einterfaces
|
||||
|
||||
import "github.com/mattermost/platform/model"
|
||||
|
||||
type ElasticSearchInterface interface {
|
||||
type ElasticsearchInterface interface {
|
||||
Start() *model.AppError
|
||||
IndexPost(post *model.Post, teamId string)
|
||||
IndexPost(post *model.Post, teamId string) *model.AppError
|
||||
SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams) ([]string, *model.AppError)
|
||||
DeletePost(postId string)
|
||||
DeletePost(postId string) *model.AppError
|
||||
TestConfig() *model.AppError
|
||||
}
|
||||
|
||||
var theElasticSearchInterface ElasticSearchInterface
|
||||
var theElasticsearchInterface ElasticsearchInterface
|
||||
|
||||
func RegisterElasticSearchInterface(newInterface ElasticSearchInterface) {
|
||||
theElasticSearchInterface = newInterface
|
||||
func RegisterElasticsearchInterface(newInterface ElasticsearchInterface) {
|
||||
theElasticsearchInterface = newInterface
|
||||
}
|
||||
|
||||
func GetElasticSearchInterface() ElasticSearchInterface {
|
||||
return theElasticSearchInterface
|
||||
func GetElasticsearchInterface() ElasticsearchInterface {
|
||||
return theElasticsearchInterface
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user