Skip to content

Commit

Permalink
Manual fix to test for using k0sproject/dig v0.3.1
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke committed Nov 13, 2024
1 parent 2e197ba commit 3258363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/component/controller/kuberouter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func getKubeRouterPlugin(cm corev1.ConfigMap, pluginType string) (dig.Mapping, e
return data, fmt.Errorf("failed to dig plugins")
}
for _, p := range plugins {
plugin := dig.Mapping(p.(map[string]interface{}))
if plugin.DigString("type") == pluginType {
plugin, ok := p.(dig.Mapping)
if ok && plugin.DigString("type") == pluginType {
return plugin, nil
}
}
Expand Down

0 comments on commit 3258363

Please sign in to comment.