MM-25014 - Default Group Name to null, until AllowGroupReference is set (#14651)

* make Group.Name a pointer to allow null

* fix unit tests

* fix build error

* fix unit test

* ensure Name field not nil

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Scott Bishel
2020-05-26 19:21:29 -06:00
коммит произвёл GitHub
родитель 91f010b8b7
Коммит ebece6c23a
16 изменённых файлов: 204 добавлений и 208 удалений

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

@@ -29,7 +29,7 @@ func TestChannelGroupEnable(t *testing.T) {
id := model.NewId()
group, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id,
Name: "name" + id,
Name: model.NewString("name" + id),
Source: model.GroupSourceLdap,
Description: "description_" + id,
RemoteId: model.NewId(),
@@ -73,7 +73,7 @@ func TestChannelGroupDisable(t *testing.T) {
id := model.NewId()
group, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id,
Name: "name" + id,
Name: model.NewString("name" + id),
Source: model.GroupSourceLdap,
Description: "description_" + id,
RemoteId: model.NewId(),
@@ -120,7 +120,7 @@ func TestChannelGroupStatus(t *testing.T) {
id := model.NewId()
group, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id,
Name: "name" + id,
Name: model.NewString("name" + id),
Source: model.GroupSourceLdap,
Description: "description_" + id,
RemoteId: model.NewId(),
@@ -163,7 +163,7 @@ func TestChannelGroupList(t *testing.T) {
id1 := model.NewId()
g1, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id1,
Name: "name" + id1,
Name: model.NewString("name" + id1),
Source: model.GroupSourceLdap,
Description: "description_" + id1,
RemoteId: model.NewId(),
@@ -181,7 +181,7 @@ func TestChannelGroupList(t *testing.T) {
id2 := model.NewId()
g2, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id2,
Name: "name" + id2,
Name: model.NewString("name" + id2),
Source: model.GroupSourceLdap,
Description: "description_" + id2,
RemoteId: model.NewId(),
@@ -222,7 +222,7 @@ func TestTeamGroupEnable(t *testing.T) {
id := model.NewId()
group, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id,
Name: "name" + id,
Name: model.NewString("name" + id),
Source: model.GroupSourceLdap,
Description: "description_" + id,
RemoteId: model.NewId(),
@@ -263,7 +263,7 @@ func TestTeamGroupDisable(t *testing.T) {
id := model.NewId()
group, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id,
Name: "name" + id,
Name: model.NewString("name" + id),
Source: model.GroupSourceLdap,
Description: "description_" + id,
RemoteId: model.NewId(),
@@ -307,7 +307,7 @@ func TestTeamGroupStatus(t *testing.T) {
id := model.NewId()
group, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id,
Name: "name" + id,
Name: model.NewString("name" + id),
Source: model.GroupSourceLdap,
Description: "description_" + id,
RemoteId: model.NewId(),
@@ -347,7 +347,7 @@ func TestTeamGroupList(t *testing.T) {
id1 := model.NewId()
g1, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id1,
Name: "name" + id1,
Name: model.NewString("name" + id1),
Source: model.GroupSourceLdap,
Description: "description_" + id1,
RemoteId: model.NewId(),
@@ -365,7 +365,7 @@ func TestTeamGroupList(t *testing.T) {
id2 := model.NewId()
g2, err := th.App.CreateGroup(&model.Group{
DisplayName: "dn_" + id2,
Name: "name" + id2,
Name: model.NewString("name" + id2),
Source: model.GroupSourceLdap,
Description: "description_" + id2,
RemoteId: model.NewId(),