Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed Mar 8, 2024
1 parent 1417605 commit 8973652
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions internal/integ/cluster/teardown.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ func (c *Cluster) awaitID(op *exov3.Operation, err error) (exov3.UUID, error) {
return "", err
}

ref, err := c.Ego.Wait(c.context, op, exov3.OperationStateSuccess)
finishedOP, err := c.Ego.Wait(c.context, op, exov3.OperationStateSuccess)
if err != nil {
return "", err
}

return ref.ID, nil
return finishedOP.Reference.ID, nil
}

func (c *Cluster) awaitSuccess(op *exov3.Operation, err error) error {
Expand Down
14 changes: 7 additions & 7 deletions internal/integ/cluster/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ func (c *Cluster) deleteAPIKeyAndRole() error {
return fmt.Errorf("error listing iam roles: %w", err)
}

for _, role := range roles.IAMRoles {
if role.Name != c.APIRoleName {
continue
}
role, err := roles.FindIAMRole(c.APIRoleName)
if err != nil {
// no role to delete
return nil
}

if err := c.awaitSuccess(c.Ego.DeleteIAMRole(c.context, role.ID)); err != nil {
slog.Error("deleting IAM role", "name", role.Name, "err", err)
}
if err := c.awaitSuccess(c.Ego.DeleteIAMRole(c.context, role.ID)); err != nil {
slog.Error("deleting IAM role", "name", role.Name, "err", err)
}

return nil
Expand Down

0 comments on commit 8973652

Please sign in to comment.