Remove more global refs / state (#7723)
* remove more global refs / state * fix job enterprise initialization * fix api4 test compilation * saml api endpoints fix
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
a0bfd2885d
Коммит
7ed011745a
@@ -400,7 +400,7 @@ func removeCertificate(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func samlCertificateStatus(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
status := app.GetSamlCertificateStatus()
|
||||
status := c.App.GetSamlCertificateStatus()
|
||||
|
||||
statusMap := map[string]interface{}{}
|
||||
statusMap["IdpCertificateFile"] = status.IdpCertificateFile
|
||||
|
||||
@@ -114,15 +114,6 @@ func Setup() *TestHelper {
|
||||
return setupTestHelper(false)
|
||||
}
|
||||
|
||||
func ReloadConfigForSetup() {
|
||||
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.TeamSettings.EnableOpenServer = true
|
||||
}
|
||||
|
||||
func (me *TestHelper) InitBasic() *TestHelper {
|
||||
me.waitForConnectivity()
|
||||
|
||||
|
||||
@@ -205,7 +205,6 @@ func TestStatuses(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetStatusesByIds(t *testing.T) {
|
||||
ReloadConfigForSetup()
|
||||
th := Setup().InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ func getInitialLoad(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
il.TeamMembers = c.Session.TeamMembers
|
||||
}
|
||||
|
||||
if app.SessionCacheLength() == 0 {
|
||||
if c.App.SessionCacheLength() == 0 {
|
||||
// Below is a special case when intializating a new server
|
||||
// Lets check to make sure the server is really empty
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user