fix: plugin test case

This commit is contained in:
mayur.popli
2025-03-27 08:30:27 +05:30
parent 4a7e9d7b4f
commit 523cd077c4
2 changed files with 91 additions and 0 deletions

View File

@@ -88,6 +88,13 @@ func validateConfig(cfg *Config) error {
if cfg == nil {
return errors.New("config cannot be nil")
}
// Check if CheckKeys is empty
if len(cfg.CheckKeys) == 0 {
return errors.New("checkKeys cannot be empty")
}
// Validate that CheckKeys does not contain empty strings
for _, key := range cfg.CheckKeys {
if key == "" {
return errors.New("checkKeys cannot contain empty strings")