mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Markdown fetch retry with lowercase (#65384)
* retry with lowercase * undo incorrect err check * re-add defer to close file * fix test
This commit is contained in:
@@ -358,7 +358,7 @@ func (f *FakeRoleRegistry) DeclarePluginRoles(_ context.Context, _ string, _ str
|
||||
}
|
||||
|
||||
type FakePluginFiles struct {
|
||||
FS fs.FS
|
||||
OpenFunc func(name string) (fs.File, error)
|
||||
|
||||
base string
|
||||
}
|
||||
@@ -370,7 +370,10 @@ func NewFakePluginFiles(base string) *FakePluginFiles {
|
||||
}
|
||||
|
||||
func (f *FakePluginFiles) Open(name string) (fs.File, error) {
|
||||
return f.FS.Open(name)
|
||||
if f.OpenFunc != nil {
|
||||
return f.OpenFunc(name)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (f *FakePluginFiles) Base() string {
|
||||
|
||||
Reference in New Issue
Block a user