Fixing formatting. (#9801)
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
46dd243331
Коммит
418a0ec10e
@@ -56,19 +56,18 @@ type TestClientRequirements struct {
|
||||
|
||||
type TestNewConfig struct {
|
||||
TestNewServiceSettings TestNewServiceSettings
|
||||
TestNewTeamSettings TestNewTeamSettings
|
||||
TestNewTeamSettings TestNewTeamSettings
|
||||
}
|
||||
|
||||
type TestNewServiceSettings struct{
|
||||
SiteUrl *string
|
||||
UseLetsEncrypt *bool
|
||||
TLSStrictTransportMaxAge *int64
|
||||
AllowedThemes []string
|
||||
type TestNewServiceSettings struct {
|
||||
SiteUrl *string
|
||||
UseLetsEncrypt *bool
|
||||
TLSStrictTransportMaxAge *int64
|
||||
AllowedThemes []string
|
||||
}
|
||||
|
||||
|
||||
type TestNewTeamSettings struct {
|
||||
SiteName *string
|
||||
SiteName *string
|
||||
MaxUserPerTeam *int
|
||||
}
|
||||
|
||||
@@ -469,16 +468,15 @@ func TestUpdateMap(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
// create a map of type map[string]interface
|
||||
configMap := configToMap(config)
|
||||
|
||||
cases := []struct{
|
||||
Name string
|
||||
cases := []struct {
|
||||
Name string
|
||||
configSettings []string
|
||||
newVal []string
|
||||
expected interface{}
|
||||
} {
|
||||
newVal []string
|
||||
expected interface{}
|
||||
}{
|
||||
{
|
||||
Name: "check for Map and string",
|
||||
configSettings: []string{"TestNewServiceSettings", "SiteUrl"},
|
||||
@@ -517,10 +515,9 @@ func TestUpdateMap(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
for _, test := range cases {
|
||||
|
||||
t.Run(test.Name, func(t *testing.T){
|
||||
t.Run(test.Name, func(t *testing.T) {
|
||||
err := UpdateMap(configMap, test.configSettings, test.newVal)
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/api4"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
Ссылка в новой задаче
Block a user