From cb3af1f5e0824bc24c6c06e27ed8ec1979b11c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20S=C3=A1rai?= Date: Fri, 19 Jul 2024 18:03:58 +0200 Subject: [PATCH] fix: revoke error debug, fix addresses check --- pkg/check/act/act.go | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/pkg/check/act/act.go b/pkg/check/act/act.go index 6f7e41c02..c3c199e90 100644 --- a/pkg/check/act/act.go +++ b/pkg/check/act/act.go @@ -103,8 +103,6 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, opts int if !bytes.Equal(file.Hash(), hash) { c.logger.Infof("Node %s. ACT file hash not equal. Uploaded size: %d Downloaded size: %d File: %s", upNodeName, file.Size(), size, file.Address().String()) return errors.New("ACT file retrieval - hash error") - } else { - c.logger.Infof("Node %s. ACT file hash equal Uploaded size: %d Downloaded size: %d File: %s, publisher: %s", upNodeName, file.Size(), size, file.Address().String(), publisher.String()) } // add grantees list @@ -154,20 +152,17 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, opts int // list grantees after patch patchAddresses, patchErr := upClient.GetActGrantees(ctx, pFile.Address()) - c.logger.Errorf("-----patchAddresses: %+v", patchAddresses) - return fmt.Errorf("-----patchErr: %+v", patchErr) - /* - if patchErr != nil { - return fmt.Errorf("node %s: GetActGrantees after patch: %w", upNodeName, patchErr) - } - if patchAddresses == nil { - return fmt.Errorf("node %s: GetActGrantees after patch: addresses is nil", upNodeName) - } - if len(addresses) != 2 { - return fmt.Errorf("node %s: GetActGrantees after patch: addresses length is not 2", upNodeName) - } - - c.logger.Info("ACT test completed") - - return*/ + if patchErr != nil { + return fmt.Errorf("node %s: GetActGrantees after patch: %w", upNodeName, patchErr) + } + if patchAddresses == nil { + return fmt.Errorf("node %s: GetActGrantees after patch: addresses is nil", upNodeName) + } + if len(patchAddresses) != 2 { + return fmt.Errorf("node %s: GetActGrantees after patch: addresses length is not 2", upNodeName) + } + + c.logger.Info("ACT test completed") + + return }