Skip to content

Commit

Permalink
Make the operator policy message case consistent
Browse files Browse the repository at this point in the history
Relates:
https://issues.redhat.com/browse/ACM-11026

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
  • Loading branch information
mprahl authored and openshift-merge-bot[bot] committed Apr 24, 2024
1 parent 21143ac commit 6790eff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions controllers/operatorpolicy_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,23 +696,23 @@ var noCSVCond = metav1.Condition{
Type: csvConditionType,
Status: metav1.ConditionFalse,
Reason: "RelevantCSVNotFound",
Message: "A relevant installed ClusterServiceVersion could not be found",
Message: "a relevant installed ClusterServiceVersion could not be found",
}

// noCRDCond is a Compliant condition for when no CRDs are found
var noCRDCond = metav1.Condition{
Type: crdConditionType,
Status: metav1.ConditionTrue,
Reason: "RelevantCRDNotFound",
Message: "No CRDs were found for the operator",
Message: "no CRDs were found for the operator",
}

// crdFoundCond is a Compliant condition for when CRDs are found
var crdFoundCond = metav1.Condition{
Type: crdConditionType,
Status: metav1.ConditionTrue,
Reason: "RelevantCRDFound",
Message: "There are CRDs present for the operator",
Message: "there are CRDs present for the operator",
}

// buildDeploymentCond creates a Condition for deployments. If any are not at their
Expand Down Expand Up @@ -758,7 +758,7 @@ var noDeploymentsCond = metav1.Condition{
Type: deploymentConditionType,
Status: metav1.ConditionTrue,
Reason: "NoRelevantDeployments",
Message: "The ClusterServiceVersion is missing, thus meaning there are no relevant deployments",
Message: "the ClusterServiceVersion is missing, thus meaning there are no relevant deployments",
}

// catalogSourceFindCond is a conditionally compliant condition with reason
Expand Down Expand Up @@ -793,7 +793,7 @@ var catalogSourceUnknownCond = metav1.Condition{
Type: "CatalogSourcesUnknownState",
Status: metav1.ConditionTrue,
Reason: "LastObservedUnknown",
Message: "Could not determine last observed state of CatalogSource",
Message: "could not determine last observed state of CatalogSource",
}

// missingWantedObj returns a NonCompliant RelatedObject with reason = 'Resource not found but should exist'
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/case38_install_operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1328,9 +1328,9 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
Type: "CustomResourceDefinitionCompliant",
Status: metav1.ConditionTrue,
Reason: "RelevantCRDNotFound",
Message: "No CRDs were found for the operator",
Message: "no CRDs were found for the operator",
},
"No CRDs were found for the operator",
"no CRDs were found for the operator",
)
})

Expand Down Expand Up @@ -1384,9 +1384,9 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
Type: "CustomResourceDefinitionCompliant",
Status: metav1.ConditionTrue,
Reason: "RelevantCRDFound",
Message: "There are CRDs present for the operator",
Message: "there are CRDs present for the operator",
},
"There are CRDs present for the operator",
"there are CRDs present for the operator",
)
})
})
Expand Down Expand Up @@ -1667,9 +1667,9 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
Type: "CustomResourceDefinitionCompliant",
Status: metav1.ConditionTrue,
Reason: "RelevantCRDNotFound",
Message: "No CRDs were found for the operator",
Message: "no CRDs were found for the operator",
},
`No CRDs were found for the operator`,
`no CRDs were found for the operator`,
)
check(
opPolName,
Expand Down Expand Up @@ -2295,7 +2295,7 @@ var _ = Describe("Testing OperatorPolicy", Ordered, func() {
Type: "CustomResourceDefinitionCompliant",
Status: metav1.ConditionTrue,
Reason: "RelevantCRDNotFound",
Message: "No CRDs were found for the operator",
Message: "no CRDs were found for the operator",
},
`the CustomResourceDefinition was deleted`,
)
Expand Down

0 comments on commit 6790eff

Please sign in to comment.