add config reload e2e tests (#29396)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c2d08b7540
Коммит
8e033f41d1
@@ -234,6 +234,29 @@ func (s *MmctlE2ETestSuite) TestConfigShowCmdF() {
|
||||
})
|
||||
}
|
||||
|
||||
func (s *MmctlE2ETestSuite) TestConfigReloadCmdF() {
|
||||
s.SetupTestHelper().InitBasic()
|
||||
|
||||
s.RunForSystemAdminAndLocal("Reload server config", func(c client.Client) {
|
||||
printer.Clean()
|
||||
|
||||
err := configReloadCmdF(c, nil, nil)
|
||||
s.Require().NoError(err)
|
||||
s.Require().Len(printer.GetLines(), 0)
|
||||
s.Require().Len(printer.GetErrorLines(), 0)
|
||||
})
|
||||
|
||||
s.Run("Reload server config without permissions", func() {
|
||||
printer.Clean()
|
||||
|
||||
err := configReloadCmdF(s.th.Client, nil, nil)
|
||||
s.Require().NotNil(err)
|
||||
s.Require().Error(err, "You do not have the appropriate permissions")
|
||||
s.Require().Len(printer.GetLines(), 0)
|
||||
s.Require().Len(printer.GetErrorLines(), 0)
|
||||
})
|
||||
}
|
||||
|
||||
func (s *MmctlE2ETestSuite) TestConfigExportCmdF() {
|
||||
s.SetupTestHelper().InitBasic()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user