mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Add missing asserts for Plugin Errors field (#51702)
* make sure to check plugin errors * remove unused test
This commit is contained in:
parent
6af8189816
commit
0b40c8e51e
@ -531,8 +531,8 @@ func TestLoader_Load_MultiplePlugins(t *testing.T) {
|
||||
},
|
||||
},
|
||||
pluginErrors: map[string]*plugins.Error{
|
||||
"test": {
|
||||
PluginID: "test",
|
||||
"test-panel": {
|
||||
PluginID: "test-panel",
|
||||
ErrorCode: "signatureMissing",
|
||||
},
|
||||
},
|
||||
@ -556,6 +556,11 @@ func TestLoader_Load_MultiplePlugins(t *testing.T) {
|
||||
if !cmp.Equal(got, tt.want, compareOpts) {
|
||||
t.Fatalf("Result mismatch (-want +got):\n%s", cmp.Diff(got, tt.want, compareOpts))
|
||||
}
|
||||
pluginErrs := l.PluginErrors()
|
||||
require.Equal(t, len(tt.pluginErrors), len(pluginErrs))
|
||||
for _, pluginErr := range pluginErrs {
|
||||
require.Equal(t, tt.pluginErrors[pluginErr.PluginID], pluginErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user