2017-04-12 08:27:57 -04:00
|
|
|
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
2017-03-14 08:43:40 -04:00
|
|
|
// See License.txt for license information.
|
|
|
|
|
|
|
|
|
|
package api4
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestLdapTest(t *testing.T) {
|
2018-11-20 20:16:25 -05:00
|
|
|
th := Setup().InitBasic()
|
2017-10-02 03:50:56 -05:00
|
|
|
defer th.TearDown()
|
2017-03-14 08:43:40 -04:00
|
|
|
|
|
|
|
|
_, resp := th.Client.TestLdap()
|
|
|
|
|
CheckForbiddenStatus(t, resp)
|
|
|
|
|
|
|
|
|
|
_, resp = th.SystemAdminClient.TestLdap()
|
|
|
|
|
CheckNotImplementedStatus(t, resp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestLdapSync(t *testing.T) {
|
2018-11-20 20:16:25 -05:00
|
|
|
th := Setup().InitBasic()
|
2017-10-02 03:50:56 -05:00
|
|
|
defer th.TearDown()
|
2017-03-14 08:43:40 -04:00
|
|
|
|
|
|
|
|
_, resp := th.SystemAdminClient.SyncLdap()
|
|
|
|
|
CheckNoError(t, resp)
|
|
|
|
|
|
|
|
|
|
_, resp = th.Client.SyncLdap()
|
|
|
|
|
CheckForbiddenStatus(t, resp)
|
|
|
|
|
}
|