From 325836335b467124db7be97ee7bc69f321f33f3a Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Wed, 13 Nov 2024 13:45:06 +0200 Subject: [PATCH] Manual fix to test for using k0sproject/dig v0.3.1 Signed-off-by: Kimmo Lehto --- pkg/component/controller/kuberouter_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/component/controller/kuberouter_test.go b/pkg/component/controller/kuberouter_test.go index aac4d31b220d..022821f75674 100644 --- a/pkg/component/controller/kuberouter_test.go +++ b/pkg/component/controller/kuberouter_test.go @@ -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 } }