Automatic Merge
Этот коммит содержится в:
@@ -35,7 +35,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
tearDown, pluginIds, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
tearDown, pluginIDs, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -96,7 +96,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
require.Equal(t, model.COMMAND_RESPONSE_TYPE_EPHEMERAL, resp.ResponseType)
|
||||
require.Equal(t, "text", resp.Text)
|
||||
|
||||
err2 := th.App.DisablePlugin(pluginIds[0])
|
||||
err2 := th.App.DisablePlugin(pluginIDs[0])
|
||||
require.Nil(t, err2)
|
||||
|
||||
commands, err3 := th.App.ListAutocompleteCommands(args.TeamId, utils.T)
|
||||
@@ -106,7 +106,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
require.NotEqual(t, "plugin", commands.Trigger)
|
||||
}
|
||||
|
||||
th.App.RemovePlugin(pluginIds[0])
|
||||
th.App.RemovePlugin(pluginIDs[0])
|
||||
})
|
||||
|
||||
t.Run("re-entrant command registration on config change", func(t *testing.T) {
|
||||
@@ -116,7 +116,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
tearDown, pluginIds, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
tearDown, pluginIDs, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -207,7 +207,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
killed = true
|
||||
}
|
||||
|
||||
th.App.RemovePlugin(pluginIds[0])
|
||||
th.App.RemovePlugin(pluginIDs[0])
|
||||
require.False(t, killed, "execute command appears to have deadlocked")
|
||||
})
|
||||
|
||||
@@ -223,7 +223,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
tearDown, pluginIds, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
tearDown, pluginIDs, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -285,10 +285,10 @@ func TestPluginCommand(t *testing.T) {
|
||||
require.Equal(t, model.COMMAND_RESPONSE_TYPE_EPHEMERAL, resp.ResponseType)
|
||||
require.Equal(t, "text", resp.Text)
|
||||
|
||||
th.App.RemovePlugin(pluginIds[0])
|
||||
th.App.RemovePlugin(pluginIDs[0])
|
||||
})
|
||||
t.Run("plugin has crashed before execution of command", func(t *testing.T) {
|
||||
tearDown, pluginIds, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
tearDown, pluginIDs, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -329,11 +329,11 @@ func TestPluginCommand(t *testing.T) {
|
||||
require.Nil(t, resp)
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "model.plugin_command_error.error.app_error")
|
||||
th.App.RemovePlugin(pluginIds[0])
|
||||
th.App.RemovePlugin(pluginIDs[0])
|
||||
})
|
||||
|
||||
t.Run("plugin has crashed due to the execution of the command", func(t *testing.T) {
|
||||
tearDown, pluginIds, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
tearDown, pluginIDs, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -374,7 +374,7 @@ func TestPluginCommand(t *testing.T) {
|
||||
require.Nil(t, resp)
|
||||
require.NotNil(t, err)
|
||||
require.Equal(t, err.Id, "model.plugin_command_crash.error.app_error")
|
||||
th.App.RemovePlugin(pluginIds[0])
|
||||
th.App.RemovePlugin(pluginIDs[0])
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user