errcheck issues fixed (#29063)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
This commit is contained in:
Arya Khochare 2024-11-04 19:03:47 +05:30 committed by GitHub
parent e3f6b16927
commit ef1be57f64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -137,7 +137,6 @@ issues:
channels/app/plugin_api_tests/manual.test_http_hijack_plugin/main.go|\
channels/app/plugin_api_tests/manual.test_serve_metrics_plugin/main.go|\
channels/app/plugin_api_tests/test_update_user_auth_plugin/main.go|\
channels/app/plugin_commands_test.go|\
channels/app/plugin_deadlock_test.go|\
channels/app/plugin_health_check_test.go|\
channels/app/plugin_hooks_test.go|\

View File

@ -106,7 +106,8 @@ func TestPluginCommand(t *testing.T) {
require.NotEqual(t, "plugin", commands.Trigger)
}
th.App.ch.RemovePlugin(pluginIDs[0])
appErr := th.App.ch.RemovePlugin(pluginIDs[0])
require.Nil(t, appErr)
})
t.Run("re-entrant command registration on config change", func(t *testing.T) {
@ -207,7 +208,8 @@ func TestPluginCommand(t *testing.T) {
killed = true
}
th.App.ch.RemovePlugin(pluginIDs[0])
appErr := th.App.ch.RemovePlugin(pluginIDs[0])
require.Nil(t, appErr)
require.False(t, killed, "execute command appears to have deadlocked")
})
@ -285,7 +287,8 @@ func TestPluginCommand(t *testing.T) {
require.Equal(t, model.CommandResponseTypeEphemeral, resp.ResponseType)
require.Equal(t, "text", resp.Text)
th.App.ch.RemovePlugin(pluginIDs[0])
appErr := th.App.ch.RemovePlugin(pluginIDs[0])
require.Nil(t, appErr)
})
t.Run("plugin has crashed before execution of command", func(t *testing.T) {
tearDown, pluginIDs, activationErrors := SetAppEnvironmentWithPlugins(t, []string{`
@ -329,7 +332,8 @@ 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.ch.RemovePlugin(pluginIDs[0])
appErr := th.App.ch.RemovePlugin(pluginIDs[0])
require.Nil(t, appErr)
})
t.Run("plugin has crashed due to the execution of the command", func(t *testing.T) {
@ -374,7 +378,8 @@ 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.ch.RemovePlugin(pluginIDs[0])
appErr := th.App.ch.RemovePlugin(pluginIDs[0])
require.Nil(t, appErr)
})
t.Run("plugin returning status code 0", func(t *testing.T) {