github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+incompatible/api4/elasticsearch_test.go (about) 1 // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package api4 5 6 import ( 7 "testing" 8 ) 9 10 func TestElasticsearchTest(t *testing.T) { 11 th := Setup().InitBasic().InitSystemAdmin() 12 defer th.TearDown() 13 14 _, resp := th.Client.TestElasticsearch() 15 CheckForbiddenStatus(t, resp) 16 17 _, resp = th.SystemAdminClient.TestElasticsearch() 18 CheckNotImplementedStatus(t, resp) 19 } 20 21 func TestElasticsearchPurgeIndexes(t *testing.T) { 22 th := Setup().InitBasic().InitSystemAdmin() 23 defer th.TearDown() 24 25 _, resp := th.Client.PurgeElasticsearchIndexes() 26 CheckForbiddenStatus(t, resp) 27 28 _, resp = th.SystemAdminClient.PurgeElasticsearchIndexes() 29 CheckNotImplementedStatus(t, resp) 30 }