Skip to content

Commit

Permalink
feat(kuma-cp): fix e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Skalski <[email protected]>
  • Loading branch information
Automaat committed Jan 30, 2025
1 parent ec3d1fa commit d15bd5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugins/policies/meshtimeout/api/v1alpha1/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func (r *MeshTimeoutResource) validate() error {
var verr validators.ValidationError
path := validators.RootedAt("spec")
verr.AddErrorAt(path.Field("targetRef"), r.validateTop(r.Spec.TargetRef, len(r.Spec.From) > 0))
verr.AddErrorAt(path.Field("targetRef"), r.validateTop(r.Spec.TargetRef, len(r.Spec.From) > 0 || len(r.Spec.Rules) > 0))
if len(r.Spec.Rules) > 0 && (len(r.Spec.To) > 0 || len(r.Spec.From) > 0) {
verr.AddViolationAt(path, "fields 'to' and 'from' must be empty when 'rules' is defined")
}
Expand Down

0 comments on commit d15bd5a

Please sign in to comment.