Fix "doesn't exists" typo (#26307)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f1a37e06bc
Коммит
fac1245143
@@ -1588,7 +1588,7 @@ func TestImportUserTeams(t *testing.T) {
|
|||||||
expectedUserChannels: 0,
|
expectedUserChannels: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Should fail if one of the roles doesn't exists",
|
name: "Should fail if one of the roles doesn't exist",
|
||||||
data: &[]imports.UserTeamImportData{
|
data: &[]imports.UserTeamImportData{
|
||||||
{
|
{
|
||||||
Name: &th.BasicTeam.Name,
|
Name: &th.BasicTeam.Name,
|
||||||
@@ -1810,7 +1810,7 @@ func TestImportUserChannels(t *testing.T) {
|
|||||||
expectedUserChannels: 0,
|
expectedUserChannels: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Should fail if one of the roles doesn't exists",
|
name: "Should fail if one of the roles doesn't exist",
|
||||||
data: &[]imports.UserChannelImportData{
|
data: &[]imports.UserChannelImportData{
|
||||||
{
|
{
|
||||||
Name: &th.BasicChannel.Name,
|
Name: &th.BasicChannel.Name,
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ func (s *MmctlE2ETestSuite) TestConfigSetCmd() {
|
|||||||
s.Require().Equal("mysql", *(config.SqlSettings.DriverName))
|
s.Require().Equal("mysql", *(config.SqlSettings.DriverName))
|
||||||
})
|
})
|
||||||
|
|
||||||
s.RunForSystemAdminAndLocal("Get error if the key doesn't exists", func(c client.Client) {
|
s.RunForSystemAdminAndLocal("Get error if the key doesn't exist", func(c client.Client) {
|
||||||
printer.Clean()
|
printer.Clean()
|
||||||
|
|
||||||
args := []string{"SqlSettings.WrongKey", "mysql"}
|
args := []string{"SqlSettings.WrongKey", "mysql"}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ func (s *MmctlUnitTestSuite) TestConfigGetCmd() {
|
|||||||
s.Require().Len(printer.GetErrorLines(), 0)
|
s.Require().Len(printer.GetErrorLines(), 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
s.Run("Get error if the key doesn't exists", func() {
|
s.Run("Get error if the key doesn't exist", func() {
|
||||||
printer.Clean()
|
printer.Clean()
|
||||||
args := []string{"SqlSettings.WrongKey"}
|
args := []string{"SqlSettings.WrongKey"}
|
||||||
outputConfig := &model.Config{}
|
outputConfig := &model.Config{}
|
||||||
@@ -443,7 +443,7 @@ func (s *MmctlUnitTestSuite) TestConfigSetCmd() {
|
|||||||
s.Require().Len(printer.GetLines(), 0)
|
s.Require().Len(printer.GetLines(), 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
s.Run("Get error if the key doesn't exists", func() {
|
s.Run("Get error if the key doesn't exist", func() {
|
||||||
printer.Clean()
|
printer.Clean()
|
||||||
defaultConfig := &model.Config{}
|
defaultConfig := &model.Config{}
|
||||||
defaultConfig.SetDefaults()
|
defaultConfig.SetDefaults()
|
||||||
@@ -713,7 +713,7 @@ func (s *MmctlUnitTestSuite) TestConfigResetCmd() {
|
|||||||
s.Require().Len(printer.GetErrorLines(), 0)
|
s.Require().Len(printer.GetErrorLines(), 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
s.Run("Should fail if the key doesn't exists", func() {
|
s.Run("Should fail if the key doesn't exist", func() {
|
||||||
printer.Clean()
|
printer.Clean()
|
||||||
args := []string{"WrongKey"}
|
args := []string{"WrongKey"}
|
||||||
defaultConfig := &model.Config{}
|
defaultConfig := &model.Config{}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ func checkValidSocket(socketPath string) error {
|
|||||||
// check file mode and permissions
|
// check file mode and permissions
|
||||||
fi, err := os.Stat(socketPath)
|
fi, err := os.Stat(socketPath)
|
||||||
if err != nil && os.IsNotExist(err) {
|
if err != nil && os.IsNotExist(err) {
|
||||||
return fmt.Errorf("socket file %q doesn't exists, please check the server configuration for local mode", socketPath)
|
return fmt.Errorf("socket file %q doesn't exist, please check the server configuration for local mode", socketPath)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ func checkValidSocket(socketPath string) error {
|
|||||||
// check file mode and permissions
|
// check file mode and permissions
|
||||||
fi, err := os.Stat(socketPath)
|
fi, err := os.Stat(socketPath)
|
||||||
if err != nil && os.IsNotExist(err) {
|
if err != nil && os.IsNotExist(err) {
|
||||||
return fmt.Errorf("socket file %q doesn't exists, please check the server configuration for local mode", socketPath)
|
return fmt.Errorf("socket file %q doesn't exist, please check the server configuration for local mode", socketPath)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user