MM-57245: Bump up Go version to 1.21 (#26512)
* MM-57245: Bump up Go version to 1.21 https://mattermost.atlassian.net/browse/MM-57245 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1dc5c006f2
Коммит
5e851f708b
@@ -32,7 +32,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -51,7 +51,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -70,7 +70,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -89,7 +89,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -108,7 +108,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -129,7 +129,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -150,7 +150,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -170,7 +170,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{StatusCode: 500}, errors.New("")).
|
||||
Times(1)
|
||||
|
||||
@@ -197,7 +197,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(7)
|
||||
|
||||
@@ -255,7 +255,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(0)
|
||||
|
||||
@@ -272,7 +272,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(outputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -296,12 +296,12 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -324,12 +324,12 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -352,12 +352,12 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -380,12 +380,12 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -407,12 +407,12 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -434,7 +434,7 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -453,7 +453,7 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -475,12 +475,12 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{StatusCode: 500}, errors.New("")).
|
||||
Times(1)
|
||||
|
||||
@@ -515,13 +515,13 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
}
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(3)
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(3)
|
||||
|
||||
@@ -555,7 +555,7 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -576,7 +576,7 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -617,12 +617,12 @@ func (s *MmctlUnitTestSuite) TestConfigPatchCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
PatchConfig(context.Background(), inputConfig).
|
||||
PatchConfig(context.TODO(), inputConfig).
|
||||
Return(inputConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -640,7 +640,7 @@ func (s *MmctlUnitTestSuite) TestConfigPatchCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -668,12 +668,12 @@ func (s *MmctlUnitTestSuite) TestConfigResetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
UpdateConfig(context.Background(), defaultConfig).
|
||||
UpdateConfig(context.TODO(), defaultConfig).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -694,12 +694,12 @@ func (s *MmctlUnitTestSuite) TestConfigResetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
s.client.
|
||||
EXPECT().
|
||||
UpdateConfig(context.Background(), defaultConfig).
|
||||
UpdateConfig(context.TODO(), defaultConfig).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -721,7 +721,7 @@ func (s *MmctlUnitTestSuite) TestConfigResetCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(defaultConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -742,7 +742,7 @@ func (s *MmctlUnitTestSuite) TestConfigShowCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(mockConfig, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -759,7 +759,7 @@ func (s *MmctlUnitTestSuite) TestConfigShowCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetConfig(context.Background()).
|
||||
GetConfig(context.TODO()).
|
||||
Return(nil, &model.Response{}, configError).
|
||||
Times(1)
|
||||
|
||||
@@ -775,7 +775,7 @@ func (s *MmctlUnitTestSuite) TestConfigReloadCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
ReloadConfig(context.Background()).
|
||||
ReloadConfig(context.TODO()).
|
||||
Return(&model.Response{StatusCode: http.StatusOK}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -789,7 +789,7 @@ func (s *MmctlUnitTestSuite) TestConfigReloadCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
ReloadConfig(context.Background()).
|
||||
ReloadConfig(context.TODO()).
|
||||
Return(&model.Response{StatusCode: http.StatusBadRequest}, errors.New("some-error")).
|
||||
Times(1)
|
||||
|
||||
@@ -813,7 +813,7 @@ func (s *MmctlUnitTestSuite) TestConfigMigrateCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
MigrateConfig(context.Background(), args[0], args[1]).
|
||||
MigrateConfig(context.TODO(), args[0], args[1]).
|
||||
Return(&model.Response{StatusCode: http.StatusOK}, nil).
|
||||
Times(1)
|
||||
|
||||
@@ -831,7 +831,7 @@ func (s *MmctlUnitTestSuite) TestConfigMigrateCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
MigrateConfig(context.Background(), args[0], args[1]).
|
||||
MigrateConfig(context.TODO(), args[0], args[1]).
|
||||
Return(&model.Response{StatusCode: http.StatusBadRequest}, errors.New("some-error")).
|
||||
Times(1)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user