Skip to content

Commit

Permalink
fix: revoke error debug, fix addresses check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferenc Sárai committed Jul 19, 2024
1 parent 8f3b2a8 commit cb3af1f
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions pkg/check/act/act.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit cb3af1f

Please sign in to comment.