summaryrefslogtreecommitdiffstats
path: root/app/elasticsearch.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/elasticsearch.go')
-rw-r--r--app/elasticsearch.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/elasticsearch.go b/app/elasticsearch.go
new file mode 100644
index 000000000..c021b15e8
--- /dev/null
+++ b/app/elasticsearch.go
@@ -0,0 +1,24 @@
+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package app
+
+import (
+ "net/http"
+
+ "github.com/mattermost/platform/model"
+ "github.com/mattermost/platform/einterfaces"
+)
+
+func TestElasticsearch() *model.AppError {
+ if esI := einterfaces.GetElasticSearchInterface(); esI != nil {
+ if err := esI.TestConfig(); err != nil {
+ return err
+ }
+ } else {
+ err := model.NewAppError("TestElasticsearch", "ent.elasticsearch.test_config.license.error", nil, "", http.StatusNotImplemented)
+ return err
+ }
+
+ return nil
+}