Implement SAML endpoints for APIv4 (#5671)
* Implement SAML endpoints for APIv4 * Fix unit test * Only disable encryption when removing puplic/private certs
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
fe38d6d5bb
Коммит
3559fb7959
@@ -38,6 +38,37 @@ type TestHelper struct {
|
||||
SystemAdminUser *model.User
|
||||
}
|
||||
|
||||
func SetupEnterprise() *TestHelper {
|
||||
if app.Srv == nil {
|
||||
utils.TranslationsPreInit()
|
||||
utils.LoadConfig("config.json")
|
||||
utils.InitTranslations(utils.Cfg.LocalizationSettings)
|
||||
utils.Cfg.TeamSettings.MaxUsersPerTeam = 50
|
||||
*utils.Cfg.RateLimitSettings.Enable = false
|
||||
utils.Cfg.EmailSettings.SendEmailNotifications = true
|
||||
utils.Cfg.EmailSettings.SMTPServer = "dockerhost"
|
||||
utils.Cfg.EmailSettings.SMTPPort = "2500"
|
||||
utils.Cfg.EmailSettings.FeedbackEmail = "test@example.com"
|
||||
utils.DisableDebugLogForTest()
|
||||
utils.License.Features.SetDefaults()
|
||||
app.NewServer()
|
||||
app.InitStores()
|
||||
InitRouter()
|
||||
app.StartServer()
|
||||
utils.InitHTML()
|
||||
InitApi(true)
|
||||
utils.EnableDebugLogForTest()
|
||||
app.Srv.Store.MarkSystemRanUnitTests()
|
||||
|
||||
*utils.Cfg.TeamSettings.EnableOpenServer = true
|
||||
}
|
||||
|
||||
th := &TestHelper{}
|
||||
th.Client = th.CreateClient()
|
||||
th.SystemAdminClient = th.CreateClient()
|
||||
return th
|
||||
}
|
||||
|
||||
func Setup() *TestHelper {
|
||||
if app.Srv == nil {
|
||||
utils.TranslationsPreInit()
|
||||
|
||||
Ссылка в новой задаче
Block a user