From 6790eff651cbf6f88bb117fdea524d9604149eff Mon Sep 17 00:00:00 2001 From: mprahl Date: Mon, 22 Apr 2024 12:44:43 -0400 Subject: [PATCH] Make the operator policy message case consistent Relates: https://issues.redhat.com/browse/ACM-11026 Signed-off-by: mprahl --- controllers/operatorpolicy_status.go | 10 +++++----- test/e2e/case38_install_operator_test.go | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/controllers/operatorpolicy_status.go b/controllers/operatorpolicy_status.go index ce0e2b31..aa1b72d4 100644 --- a/controllers/operatorpolicy_status.go +++ b/controllers/operatorpolicy_status.go @@ -696,7 +696,7 @@ 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 @@ -704,7 +704,7 @@ 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 @@ -712,7 +712,7 @@ 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 @@ -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 @@ -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' diff --git a/test/e2e/case38_install_operator_test.go b/test/e2e/case38_install_operator_test.go index 96cf0ad6..e6eeedea 100644 --- a/test/e2e/case38_install_operator_test.go +++ b/test/e2e/case38_install_operator_test.go @@ -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", ) }) @@ -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", ) }) }) @@ -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, @@ -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`, )