github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+incompatible/api4/cluster_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 TestGetClusterStatus(t *testing.T) { 11 th := Setup().InitBasic().InitSystemAdmin() 12 defer th.TearDown() 13 14 _, resp := th.Client.GetClusterStatus() 15 CheckForbiddenStatus(t, resp) 16 17 infos, resp := th.SystemAdminClient.GetClusterStatus() 18 CheckNoError(t, resp) 19 20 if infos == nil { 21 t.Fatal("should not be nil") 22 } 23 }