[MM-31790] Support Packet Generation BACKEND (#16667)

* init commit

* clean up the code

* make mocks

* fix translations

* mocks and lint fixes

* add tests

* little fixes

* Update i18n/en.json

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Update i18n/en.json

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Update i18n/en.json

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Update i18n/en.json

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Update i18n/en.json

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Address Comments

* fix i18n

* update api endpoint

* add enable file and file level for conditional show of banner

* Address Comments

* Make it more clear about returns

* Create zip file utility function

* update en.json

* address comments

* write tests

* check for data in test

* remove warning string

* Correct expected and actual

* set database through environment variables

* reset environment variable at end of test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Этот коммит содержится в:
Hossein
2021-02-01 15:18:52 -05:00
коммит произвёл GitHub
родитель 745d61f388
Коммит 01f264cd62
19 изменённых файлов: 677 добавлений и 0 удалений

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

@@ -23,4 +23,5 @@ type LdapInterface interface {
FirstLoginSync(user *model.User, userAuthService, userAuthData, email string) *model.AppError
UpdateProfilePictureIfNecessary(model.User, model.Session)
GetADLdapIdFromSAMLId(authData string) string
GetVendorNameAndVendorVersion() (string, string)
}

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

@@ -233,6 +233,27 @@ func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[
return r0, r1
}
// GetVendorNameAndVendorVersion provides a mock function with given fields:
func (_m *LdapInterface) GetVendorNameAndVendorVersion() (string, string) {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
var r1 string
if rf, ok := ret.Get(1).(func() string); ok {
r1 = rf()
} else {
r1 = ret.Get(1).(string)
}
return r0, r1
}
// MigrateIDAttribute provides a mock function with given fields: toAttribute
func (_m *LdapInterface) MigrateIDAttribute(toAttribute string) error {
ret := _m.Called(toAttribute)