Skip to content

Commit

Permalink
Output unavailable resources (#436)
Browse files Browse the repository at this point in the history
Co-authored-by: rosecrisp <[email protected]>
  • Loading branch information
komish and rosecrisp committed Apr 24, 2024
1 parent a8fa028 commit 280c10a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/tool/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,14 @@ func (k Kubectl) WaitForWorkloadResources(context context.Context, namespace str
return errors.New(errorMsg)
}
if len(unavailableWorkloadResources) > 0 {
errorMsg := "error unavailable workload resources, timeout has expired, please consider increasing the timeout using the chart-verifier --timeout flag"
// Initialize errorMsg
errorMsg := "error unavailable workload resources, timeout has expired, please consider increasing the timeout using the chart-verifier --timeout flag. Unavailable resources: "
for _, unavailableWorkloadResource := range unavailableWorkloadResources {
errorMsg += fmt.Sprintf("%s/%s, ", unavailableWorkloadResource.ResourceType, unavailableWorkloadResource.Name)
}
utils.LogError(errorMsg)
return errors.New(errorMsg)
}

return nil
}

Expand Down

0 comments on commit 280c10a

Please sign in to comment.