mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 21:42:37 +08:00
Chore: use errutil for pluginRepo errors (#78647)
* Chore: use errutil for pluginRepo errors * Update pkg/util/errutil/status.go * Use errutil helper functions Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com> * Forgot the log level * Use entity --------- Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
@ -35,14 +35,14 @@ func TestGetPluginArchive(t *testing.T) {
|
||||
{
|
||||
name: "Incorrect SHA returns error",
|
||||
sha: "1a2b3c",
|
||||
err: &ErrChecksumMismatch{},
|
||||
err: ErrChecksumMismatchBase,
|
||||
},
|
||||
{
|
||||
name: "Core plugin",
|
||||
sha: "69f698961b6ea651211a187874434821c4727cc22de022e3a7059116d21c75b1",
|
||||
apiOpSys: "any",
|
||||
apiUrl: "https://github.com/grafana/grafana/tree/main/public/app/plugins/test",
|
||||
err: &ErrCorePlugin{},
|
||||
err: ErrCorePluginBase,
|
||||
},
|
||||
{
|
||||
name: "Decoupled core plugin",
|
||||
@ -99,7 +99,7 @@ func TestGetPluginArchive(t *testing.T) {
|
||||
co := NewCompatOpts(grafanaVersion, opSys, arch)
|
||||
archive, err := m.GetPluginArchive(context.Background(), pluginID, version, co)
|
||||
if tc.err != nil {
|
||||
require.ErrorAs(t, err, tc.err)
|
||||
require.ErrorIs(t, err, tc.err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user