Relese5.0 merge master 20180608 (#8933)

* Add missing diagnostics (#8911)

* Update diagnostics.go

* Update diagnostics.go

* Fix push notification styling backwards compatibility (#8913)

* MM-10803: remove premature user sanitization on deactivation (#8926)

* remove unused UpdateNonSSOUserActive

* MM-10803: stop prematurely sanitizing users on deactivate

This change was preceded by the removal of UpdateNonSSOUserActive to
ensure there are no APIs relying on the sanitized return value.

* MM-10803: test websocket events after UpdateUserActive

* MM-10264: Adds system scheme to permissions import/export. (#8924)

* MM-10264: Adds system scheme to permissions import/export.

* MM-10264: Switches to more likely unique name.

* MM-10264: Changed collision prevention string.

* MM-10264: Rolls back created schemes in all error cases.

* MM-10264: Test fix for more rollback cases.
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2018-06-08 17:04:17 +02:00
коммит произвёл GitHub
родитель e09b3c566b
Коммит 3bae67489f
6 изменённых файлов: 195 добавлений и 89 удалений

Просмотреть файл

@@ -96,24 +96,6 @@ func TestCreateOAuthUser(t *testing.T) {
}
}
func TestDeactivateSSOUser(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
r := rand.New(rand.NewSource(time.Now().UnixNano()))
glUser := oauthgitlab.GitLabUser{Id: int64(r.Intn(1000)) + 1, Username: "o" + model.NewId(), Email: model.NewId() + "@simulator.amazonses.com", Name: "Joram Wilander"}
json := glUser.ToJson()
user, err := th.App.CreateOAuthUser(model.USER_AUTH_SERVICE_GITLAB, strings.NewReader(json), th.BasicTeam.Id)
if err != nil {
t.Fatal(err)
}
defer th.App.PermanentDeleteUser(user)
_, err = th.App.UpdateNonSSOUserActive(user.Id, false)
assert.Equal(t, "api.user.update_active.no_deactivate_sso.app_error", err.Id)
}
func TestCreateProfileImage(t *testing.T) {
b, err := CreateProfileImage("Corey Hulen", "eo1zkdr96pdj98pjmq8zy35wba", "luximbi.ttf")
if err != nil {