From 0ce352d13b82199f4c2ea503b3e57d255f10ec25 Mon Sep 17 00:00:00 2001 From: Charlie Chiang Date: Fri, 5 Aug 2022 01:33:27 +0800 Subject: [PATCH] Test: fix tests Signed-off-by: Charlie Chiang --- pkg/appfile/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/appfile/parser.go b/pkg/appfile/parser.go index 3c5a8dc5a..07480dd21 100644 --- a/pkg/appfile/parser.go +++ b/pkg/appfile/parser.go @@ -381,7 +381,7 @@ func (p *Parser) parsePoliciesFromRevision(ctx context.Context, af *Appfile) (er return err } for _, policy := range af.Policies { - if policy.Properties == nil { + if policy.Properties == nil && policy.Type != v1alpha1.DebugPolicyType { return fmt.Errorf("policy %s named %s must not have empty properties", policy.Type, policy.Name) } switch policy.Type { @@ -410,7 +410,7 @@ func (p *Parser) parsePolicies(ctx context.Context, af *Appfile) (err error) { return err } for _, policy := range af.Policies { - if policy.Properties == nil { + if policy.Properties == nil && policy.Type != v1alpha1.DebugPolicyType { return fmt.Errorf("policy %s named %s must not have empty properties", policy.Type, policy.Name) } switch policy.Type {