Skip to content

Commit

Permalink
test: log complete status for CSV failure
Browse files Browse the repository at this point in the history
If the CSV is in Failed state, log/return
the complete status field which helps in
understanding what went wrong.

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 committed Mar 26, 2024
1 parent 74f781f commit 6197dc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/deploymanager/olm.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ func (d *DeployManager) WaitForCsv(csv *operatorsv1alpha1.ClusterServiceVersion)
return false, nil
}
if existingcsv.Status.Phase != operatorsv1alpha1.CSVPhaseSucceeded {
lastReason = fmt.Sprintf("waiting for CSV to succeed, but stuck in %s phase", existingcsv.Status.Phase)
// add complete status to lastReason which helps to understand what
// when wrong in testing.
lastReason = fmt.Sprintf("waiting for CSV to succeed, but stuck in %s phase with status:%+v", existingcsv.Status.Phase, existingcsv.Status)
return false, nil
}
return true, nil
Expand Down

0 comments on commit 6197dc0

Please sign in to comment.