Skip to content

Commit b93bd3c

Browse files
committed
Check the error before using the CV
1 parent 4094de8 commit b93bd3c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/cvo/accept_risks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ var _ = g.Describe(`[Jira:"Cluster Version Operator"] cluster-version-operator`,
4141
o.Expect(util.SkipIfMicroshift(ctx, c)).To(o.BeNil())
4242

4343
cv, err := configClient.ClusterVersions().Get(ctx, external.DefaultClusterVersionName, metav1.GetOptions{})
44+
o.Expect(err).NotTo(o.HaveOccurred())
4445
if du := cv.Spec.DesiredUpdate; du != nil {
4546
logger.WithValues("AcceptRisks", du.AcceptRisks).Info("Accept risks before testing")
4647
o.Expect(du.AcceptRisks).To(o.BeEmpty(), "found accept risks")
4748
}
4849
backup = *cv.Spec.DeepCopy()
49-
o.Expect(err).NotTo(o.HaveOccurred())
5050
})
5151

5252
g.AfterEach(func() {

0 commit comments

Comments
 (0)