Skip to content

🌱 fix (ci): fix lint issue: shadow: declaration of pluginCfg shadows declaration #4725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkg/config/v3/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,22 +405,20 @@ var _ = Describe("Cfg", func() {
})

It("DecodePluginConfig should fail for no plugin config object", func() {
var pluginCfg PluginConfig
err := c0.DecodePluginConfig(key, &pluginCfg)
Expect(err).To(HaveOccurred())
Expect(errors.As(err, &config.PluginKeyNotFoundError{})).To(BeTrue())
})

It("DecodePluginConfig should fail to retrieve data from a non-existent plugin", func() {
var pluginCfg PluginConfig
err := c1.DecodePluginConfig("plugin-y", &pluginCfg)
Expect(err).To(HaveOccurred())
Expect(errors.As(err, &config.PluginKeyNotFoundError{})).To(BeTrue())
})

DescribeTable("DecodePluginConfig should retrieve the plugin data correctly",
func(getCfg func() Cfg, expected func() PluginConfig) {
var pluginCfg PluginConfig
pluginCfg = PluginConfig{} // reset to not reuse values
Expect(getCfg().DecodePluginConfig(key, &pluginCfg)).To(Succeed())
Expect(pluginCfg).To(Equal(expected()))
},
Expand Down
Loading