коммит произвёл
GitHub
родитель
f290745496
Коммит
c3ed07e679
@@ -145,7 +145,7 @@ func TestInviteProvider(t *testing.T) {
|
||||
groupChannel := th.createChannel(th.BasicTeam, model.ChannelTypePrivate)
|
||||
_, err := th.App.AddChannelMember(th.Context, th.BasicUser.Id, groupChannel, app.ChannelMemberOpts{})
|
||||
require.Nil(t, err)
|
||||
groupChannel.GroupConstrained = model.NewBool(true)
|
||||
groupChannel.GroupConstrained = model.NewPointer(true)
|
||||
groupChannel, _ = th.App.UpdateChannel(th.Context, groupChannel)
|
||||
|
||||
msg := "@" + th.BasicUser2.Username + " ~" + groupChannel.Name
|
||||
@@ -213,7 +213,7 @@ func TestInviteGroup(t *testing.T) {
|
||||
th := setup(t).initBasic()
|
||||
defer th.tearDown()
|
||||
|
||||
th.BasicTeam.GroupConstrained = model.NewBool(true)
|
||||
th.BasicTeam.GroupConstrained = model.NewPointer(true)
|
||||
var err *model.AppError
|
||||
_, _ = th.App.AddTeamMember(th.Context, th.BasicTeam.Id, th.BasicUser.Id)
|
||||
_, err = th.App.AddTeamMember(th.Context, th.BasicTeam.Id, th.BasicUser2.Id)
|
||||
@@ -274,7 +274,7 @@ func TestUserGroups(t *testing.T) {
|
||||
id := model.NewId()
|
||||
teamGroup, err := th.App.CreateGroup(&model.Group{
|
||||
DisplayName: "dn_" + id,
|
||||
Name: model.NewString("name" + id),
|
||||
Name: model.NewPointer("name" + id),
|
||||
Source: model.GroupSourceCustom,
|
||||
Description: "description_" + id,
|
||||
AllowReference: true,
|
||||
@@ -293,7 +293,7 @@ func TestUserGroups(t *testing.T) {
|
||||
id2 := model.NewId()
|
||||
nonTeamGroup, err := th.App.CreateGroup(&model.Group{
|
||||
DisplayName: "dn_" + id2,
|
||||
Name: model.NewString("name" + id2),
|
||||
Name: model.NewPointer("name" + id2),
|
||||
Source: model.GroupSourceCustom,
|
||||
Description: "description_" + id2,
|
||||
AllowReference: true,
|
||||
|
||||
@@ -354,8 +354,8 @@ func TestDoCommandRequest(t *testing.T) {
|
||||
defer th.tearDown()
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
cfg.ServiceSettings.AllowedUntrustedInternalConnections = model.NewString("127.0.0.1")
|
||||
cfg.ServiceSettings.EnableCommands = model.NewBool(true)
|
||||
cfg.ServiceSettings.AllowedUntrustedInternalConnections = model.NewPointer("127.0.0.1")
|
||||
cfg.ServiceSettings.EnableCommands = model.NewPointer(true)
|
||||
})
|
||||
|
||||
t.Run("with a valid text response", func(t *testing.T) {
|
||||
@@ -434,7 +434,7 @@ func TestDoCommandRequest(t *testing.T) {
|
||||
defer server.Close()
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
cfg.ServiceSettings.OutgoingIntegrationRequestsTimeout = model.NewInt64(1)
|
||||
cfg.ServiceSettings.OutgoingIntegrationRequestsTimeout = model.NewPointer(int64(1))
|
||||
})
|
||||
|
||||
_, _, err := th.App.DoCommandRequest(th.Context, &model.Command{URL: server.URL}, url.Values{})
|
||||
@@ -452,7 +452,7 @@ func TestDoCommandRequest(t *testing.T) {
|
||||
defer server.Close()
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
cfg.ServiceSettings.OutgoingIntegrationRequestsTimeout = model.NewInt64(2)
|
||||
cfg.ServiceSettings.OutgoingIntegrationRequestsTimeout = model.NewPointer(int64(2))
|
||||
})
|
||||
|
||||
_, resp, err := th.App.DoCommandRequest(th.Context, &model.Command{URL: server.URL}, url.Values{})
|
||||
@@ -466,7 +466,7 @@ func TestDoCommandRequest(t *testing.T) {
|
||||
outgoingOauthIface := &mocks.OutgoingOAuthConnectionInterface{}
|
||||
outgoingOauthImpl := th.App.Srv().OutgoingOAuthConnection
|
||||
outgoingOAuthConnectionConfig := th.App.Config().ServiceSettings.EnableOutgoingOAuthConnections
|
||||
th.App.Config().ServiceSettings.EnableOutgoingOAuthConnections = model.NewBool(true)
|
||||
th.App.Config().ServiceSettings.EnableOutgoingOAuthConnections = model.NewPointer(true)
|
||||
t.Cleanup(func() {
|
||||
th.App.Srv().OutgoingOAuthConnection = outgoingOauthImpl
|
||||
th.App.Config().ServiceSettings.EnableOutgoingOAuthConnections = outgoingOAuthConnectionConfig
|
||||
|
||||
@@ -261,7 +261,7 @@ type ChannelOption func(*model.Channel)
|
||||
|
||||
func WithShared(v bool) ChannelOption {
|
||||
return func(channel *model.Channel) {
|
||||
channel.Shared = model.NewBool(v)
|
||||
channel.Shared = model.NewPointer(v)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user