diff --git a/cmd/certsuite/check/check.go b/cmd/certsuite/check/check.go index 0502bafd9a..32ebb6197b 100644 --- a/cmd/certsuite/check/check.go +++ b/cmd/certsuite/check/check.go @@ -9,7 +9,7 @@ import ( var ( checkCmd = &cobra.Command{ Use: "check", - Short: "check the status of workload resources or artifacts.", + Short: "check the status of certsuite resources or artifacts.", } ) diff --git a/cmd/certsuite/claim/compare/compare.go b/cmd/certsuite/claim/compare/compare.go index 4962876478..8539beb515 100644 --- a/cmd/certsuite/claim/compare/compare.go +++ b/cmd/certsuite/claim/compare/compare.go @@ -16,7 +16,7 @@ import ( const longHelp = `Compares sections of both claim files and the differences are shown in a table per section. This tool can be helpful when the result of some test cases is different between two (consecutive) runs, as it shows -configuration differences in both the Workload Cert Suite config and the cluster nodes that could be the root cause for +configuration differences in both the Cert Suite config and the cluster nodes that could be the root cause for some of the test cases results discrepancy. All the compared sections, except the test cases results are compared blindly, traversing the whole json tree and @@ -148,7 +148,7 @@ func claimCompareFilesfunc(claim1, claim2 string) error { tcsDiffReport := testcases.GetDiffReport(claimFile1Data.Claim.Results, claimFile2Data.Claim.Results) fmt.Println(tcsDiffReport) - // Show Workload Certification Suite configuration differences. + // Show Certification Suite configuration differences. claim1Configurations := &claimFile1Data.Claim.Configurations claim2Configurations := &claimFile2Data.Claim.Configurations configurationsDiffReport := configurations.GetDiffReport(claim1Configurations, claim2Configurations) diff --git a/cmd/certsuite/claim/compare/configurations/configurations.go b/cmd/certsuite/claim/compare/configurations/configurations.go index 902f7c7fec..a7da0276c7 100644 --- a/cmd/certsuite/claim/compare/configurations/configurations.go +++ b/cmd/certsuite/claim/compare/configurations/configurations.go @@ -26,7 +26,7 @@ func (c *AbnormalEventsCount) String() string { } type DiffReport struct { - Config *diff.Diffs `json:"WorkloadCertSuiteConfig"` + Config *diff.Diffs `json:"CertSuiteConfig"` AbnormalEvents AbnormalEventsCount `json:"abnormalEventsCount"` } @@ -44,7 +44,7 @@ func (d *DiffReport) String() string { func GetDiffReport(claim1Configurations, claim2Configurations *claim.Configurations) *DiffReport { return &DiffReport{ - Config: diff.Compare("Workload Cert Suite Configuration", claim1Configurations.Config, claim2Configurations.Config, nil), + Config: diff.Compare("Cert Suite Configuration", claim1Configurations.Config, claim2Configurations.Config, nil), AbnormalEvents: AbnormalEventsCount{ Claim1: len(claim1Configurations.AbnormalEvents), Claim2: len(claim2Configurations.AbnormalEvents), diff --git a/cmd/certsuite/claim/compare/configurations/configurations_test.go b/cmd/certsuite/claim/compare/configurations/configurations_test.go index ec433aad41..fc71da4e90 100644 --- a/cmd/certsuite/claim/compare/configurations/configurations_test.go +++ b/cmd/certsuite/claim/compare/configurations/configurations_test.go @@ -21,20 +21,20 @@ func TestGetDiffReport(t *testing.T) { configs1: &claim.Configurations{}, configs2: &claim.Configurations{}, expectedDiff: &DiffReport{ - Config: &diff.Diffs{Name: "Workload Cert Suite Configuration"}, + Config: &diff.Diffs{Name: "Cert Suite Configuration"}, AbnormalEvents: AbnormalEventsCount{}, }, expectedDiffStr: `CONFIGURATIONS -------------- -Workload Cert Suite Configuration: Differences +Cert Suite Configuration: Differences FIELD CLAIM 1 CLAIM 2 -Workload Cert Suite Configuration: Only in CLAIM 1 +Cert Suite Configuration: Only in CLAIM 1 -Workload Cert Suite Configuration: Only in CLAIM 2 +Cert Suite Configuration: Only in CLAIM 2 Cluster abnormal events count @@ -57,7 +57,7 @@ CLAIM 1 CLAIM 2 AbnormalEvents: []interface{}{"event1", "event2"}, }, expectedDiff: &DiffReport{ - Config: &diff.Diffs{Name: "Workload Cert Suite Configuration"}, + Config: &diff.Diffs{Name: "Cert Suite Configuration"}, AbnormalEvents: AbnormalEventsCount{ Claim1: 2, Claim2: 2, @@ -66,14 +66,14 @@ CLAIM 1 CLAIM 2 expectedDiffStr: `CONFIGURATIONS -------------- -Workload Cert Suite Configuration: Differences +Cert Suite Configuration: Differences FIELD CLAIM 1 CLAIM 2 -Workload Cert Suite Configuration: Only in CLAIM 1 +Cert Suite Configuration: Only in CLAIM 1 -Workload Cert Suite Configuration: Only in CLAIM 2 +Cert Suite Configuration: Only in CLAIM 2 Cluster abnormal events count @@ -98,7 +98,7 @@ CLAIM 1 CLAIM 2 }, expectedDiff: &DiffReport{ Config: &diff.Diffs{ - Name: "Workload Cert Suite Configuration", + Name: "Cert Suite Configuration", Fields: []diff.FieldDiff{{ FieldPath: "/field1", Claim1Value: "value1", @@ -114,14 +114,14 @@ CLAIM 1 CLAIM 2 expectedDiffStr: `CONFIGURATIONS -------------- -Workload Cert Suite Configuration: Differences +Cert Suite Configuration: Differences FIELD CLAIM 1 CLAIM 2 /field1 value1 value11 -Workload Cert Suite Configuration: Only in CLAIM 1 +Cert Suite Configuration: Only in CLAIM 1 -Workload Cert Suite Configuration: Only in CLAIM 2 +Cert Suite Configuration: Only in CLAIM 2 /field2/subfield1=58 Cluster abnormal events count diff --git a/cmd/certsuite/claim/compare/versions/versions_test.go b/cmd/certsuite/claim/compare/versions/versions_test.go index 3a09647e4a..0002316684 100644 --- a/cmd/certsuite/claim/compare/versions/versions_test.go +++ b/cmd/certsuite/claim/compare/versions/versions_test.go @@ -34,16 +34,16 @@ func TestCompare(t *testing.T) { K8s: "22", OcClient: "333", Ocp: "4444", - Certsuite: "55555", - CertsuiteGitCommit: "666666", + CertSuite: "55555", + CertSuiteGitCommit: "666666", }, claim2Versions: &officialClaimScheme.Versions{ ClaimFormat: "1", K8s: "22", OcClient: "333", Ocp: "4444", - Certsuite: "55555", - CertsuiteGitCommit: "666666", + CertSuite: "55555", + CertSuiteGitCommit: "666666", }, }, want: &DiffReport{Diffs: &diff.Diffs{Name: "VERSIONS"}}, @@ -56,16 +56,16 @@ func TestCompare(t *testing.T) { K8s: "22AAA", OcClient: "333", Ocp: "4444", - Certsuite: "55555", - CertsuiteGitCommit: "666666", + CertSuite: "55555", + CertSuiteGitCommit: "666666", }, claim2Versions: &officialClaimScheme.Versions{ ClaimFormat: "1", K8s: "22", OcClient: "333", Ocp: "4444", - Certsuite: "55555", - CertsuiteGitCommit: "666666", + CertSuite: "55555", + CertSuiteGitCommit: "666666", }, }, want: &DiffReport{Diffs: &diff.Diffs{ @@ -87,16 +87,16 @@ func TestCompare(t *testing.T) { K8s: "22AAA", OcClient: "333", Ocp: "4444", - Certsuite: "55555", - CertsuiteGitCommit: "666666", + CertSuite: "55555", + CertSuiteGitCommit: "666666", }, claim2Versions: &officialClaimScheme.Versions{ ClaimFormat: "1", K8s: "22", OcClient: "333", Ocp: "4444", - Certsuite: "55555BBBB", - CertsuiteGitCommit: "666666", + CertSuite: "55555BBBB", + CertSuiteGitCommit: "666666", }, }, want: &DiffReport{Diffs: &diff.Diffs{ @@ -108,7 +108,7 @@ func TestCompare(t *testing.T) { Claim2Value: "22", }, { - FieldPath: "/workload", + FieldPath: "/certsuite", Claim1Value: "55555", Claim2Value: "55555BBBB", }, diff --git a/cmd/certsuite/claim/show/failures/failures.go b/cmd/certsuite/claim/show/failures/failures.go index b5cc5cc206..cf8defa17f 100644 --- a/cmd/certsuite/claim/show/failures/failures.go +++ b/cmd/certsuite/claim/show/failures/failures.go @@ -32,14 +32,14 @@ Test Suite: access-control Description: Ensures that containers do not use SYS_ADMIN capability Failure reasons: 1 - Type: Container, Reason: Non compliant capability detected in container - Namespace: workload, Pod Name: test-887998557-8gwwm, Container Name: test, SCC Capability: SYS_ADMIN + Namespace: certsuite, Pod Name: test-887998557-8gwwm, Container Name: test, SCC Capability: SYS_ADMIN 2 - Type: Container, Reason: Non compliant capability detected in container - Namespace: workload, Pod Name: test-887998557-pr2w5, Container Name: test, SCC Capability: SYS_ADMIN + Namespace: certsuite, Pod Name: test-887998557-pr2w5, Container Name: test, SCC Capability: SYS_ADMIN Test Case: access-control-security-context Description: Checks the security context matches one of the 4 categories Failure reasons: 1 - Type: ContainerCategory, Reason: container category is NOT category 1 or category NoUID0 - Namespace: workload, Pod Name: jack-6f88b5bfb4-q5cw6, Container Name: jack, Category: CategoryID4(anything not matching lower category) + Namespace: certsuite, Pod Name: jack-6f88b5bfb4-q5cw6, Container Name: jack, Category: CategoryID4(anything not matching lower category) 2 - ... ... Test Suite: lifecycle @@ -60,7 +60,7 @@ Test Suite: lifecycle "type": "Container", "reason": "Non compliant capability detected in container", "spec": { - "Namespace": "workload", + "Namespace": "certsuite", "Pod Name": "test-887998557-8gwwm", "Container Name": "test", "SCC Capability": "SYS_ADMIN" @@ -70,7 +70,7 @@ Test Suite: lifecycle "type": "Container", "reason": "Non compliant capability detected in container", "spec": { - "Namespace": "workload", + "Namespace": "certsuite", "Pod Name": "test-887998557-pr2w5", "Container Name": "test", "SCC Capability": "SYS_ADMIN" diff --git a/cmd/certsuite/claim/show/failures/failures_test.go b/cmd/certsuite/claim/show/failures/failures_test.go index a446847ffe..0711412034 100644 --- a/cmd/certsuite/claim/show/failures/failures_test.go +++ b/cmd/certsuite/claim/show/failures/failures_test.go @@ -119,7 +119,7 @@ func TestGetNonCompliantObjectsFromFailureReason(t *testing.T) { ], "ObjectFieldsValues": [ "Non compliant capability detected in container", - "workload", + "certSuite", "test-887998557-8gwwm", "test", "SYS_ADMIN" @@ -138,7 +138,7 @@ func TestGetNonCompliantObjectsFromFailureReason(t *testing.T) { }{ { Key: "Namespace", - Value: "workload", + Value: "certSuite", }, { Key: "Pod Name", @@ -173,7 +173,7 @@ func TestGetNonCompliantObjectsFromFailureReason(t *testing.T) { ], "ObjectFieldsValues": [ "Non compliant capability detected in container", - "workload", + "certSuite", "test-887998557-8gwwm", "test", "SYS_ADMIN" @@ -190,7 +190,7 @@ func TestGetNonCompliantObjectsFromFailureReason(t *testing.T) { ], "ObjectFieldsValues": [ "Non compliant capability detected in container", - "workload", + "certSuite", "test-887998557-pr2w5", "test", "SYS_ADMIN" @@ -210,7 +210,7 @@ func TestGetNonCompliantObjectsFromFailureReason(t *testing.T) { }{ { Key: "Namespace", - Value: "workload", + Value: "certSuite", }, { Key: "Pod Name", @@ -237,7 +237,7 @@ func TestGetNonCompliantObjectsFromFailureReason(t *testing.T) { }{ { Key: "Namespace", - Value: "workload", + Value: "certSuite", }, { Key: "Pod Name", @@ -322,7 +322,7 @@ func TestGetFailedTestCasesByTestSuite(t *testing.T) { }{ { Key: "Namespace", - Value: "workload", + Value: "certSuite", }, { Key: "Pod Name", @@ -349,7 +349,7 @@ func TestGetFailedTestCasesByTestSuite(t *testing.T) { }{ { Key: "Namespace", - Value: "workload", + Value: "certSuite", }, { Key: "Pod Name", diff --git a/cmd/certsuite/generate/config/config.go b/cmd/certsuite/generate/config/config.go index 4a5a0d756b..49c3315ac7 100644 --- a/cmd/certsuite/generate/config/config.go +++ b/cmd/certsuite/generate/config/config.go @@ -25,10 +25,10 @@ func NewCommand() *cobra.Command { } var ( - // generateConfiCmd is a helper tool to generate a Workload config YAML file + // generateConfiCmd is a helper tool to generate a Cert Suiteconfig YAML file generateConfigCmd = &cobra.Command{ Use: "config", - Short: "Generates a Workload config YAML file with user input.", + Short: "Generates a Cert Suite config YAML file with user input.", Run: func(cmd *cobra.Command, args []string) { generateConfig() }, @@ -84,7 +84,7 @@ func generateConfig() { func createConfiguration() { createMenu := []configOption{ - {Option: workloadResources, Help: workloadResourcesHelp}, + {Option: certSuiteResources, Help: certSuiteResourcesHelp}, {Option: exceptions, Help: exceptionsdHelp}, // {Option: collector, Help: collectordHelp}, {Option: settings, Help: settingsHelp}, @@ -107,8 +107,8 @@ func createConfiguration() { return } switch createMenu[i].Option { - case workloadResources: - createWorkloadResourcesConfiguration() + case certSuiteResources: + createCertSuiteResourcesConfiguration() case exceptions: createExceptionsConfiguration() // case collector: @@ -127,7 +127,7 @@ func showConfiguration(config *configuration.TestConfiguration) { log.Printf("could not marshal the YAML file, err: %v", err) return } - fmt.Println("================= Workload CONFIGURATION =================") + fmt.Println("================= Cert Suite CONFIGURATION =================") fmt.Println(string(configYaml)) fmt.Println("=====================================================") } @@ -140,7 +140,7 @@ func saveConfiguration(config *configuration.TestConfiguration) { } saveConfigPrompt := promptui.Prompt{ - Label: "Workload config file", + Label: "Cert Suite config file", Default: defaultConfigFileName, } @@ -159,8 +159,8 @@ func saveConfiguration(config *configuration.TestConfiguration) { fmt.Println(color.GreenString("Configuration saved")) } -func createWorkloadResourcesConfiguration() { - workloadResourcesOptions := []configOption{ +func createCertSuiteResourcesConfiguration() { + certSuiteResourcesOptions := []configOption{ {Option: namespaces, Help: namespacesHelp}, {Option: pods, Help: podLabelsHelp}, {Option: operators, Help: operatorLabelsHelp}, @@ -169,29 +169,29 @@ func createWorkloadResourcesConfiguration() { {Option: managedStatefulSets, Help: managedStatefulSetsHelp}, {Option: previousMenu, Help: backHelp}, } - workloadResourcesSearcher := func(input string, index int) bool { - basicOption := workloadResourcesOptions[index] + certSuiteResourcesSearcher := func(input string, index int) bool { + basicOption := certSuiteResourcesOptions[index] name := strings.ReplaceAll(strings.ToLower(basicOption.Option), " ", "") input = strings.ReplaceAll(strings.ToLower(input), " ", "") return strings.Contains(name, input) } - workloadResourcesPrompt := promptui.Select{ + certSuiteResourcesPrompt := promptui.Select{ Label: "", - Items: workloadResourcesOptions, + Items: certSuiteResourcesOptions, Templates: templates, Size: 7, - Searcher: workloadResourcesSearcher, + Searcher: certSuiteResourcesSearcher, HideSelected: true, } var exit bool for !exit { - i, _, err := workloadResourcesPrompt.Run() + i, _, err := certSuiteResourcesPrompt.Run() if err != nil { log.Printf("Prompt failed %v\n", err) return } - switch workloadResourcesOptions[i].Option { + switch certSuiteResourcesOptions[i].Option { case namespaces: loadNamespaces(getAnswer(namespacePrompt, namespaceSyntax, namespaceExample)) case pods: diff --git a/cmd/certsuite/generate/config/const.go b/cmd/certsuite/generate/config/const.go index 22286dbd29..888817208d 100644 --- a/cmd/certsuite/generate/config/const.go +++ b/cmd/certsuite/generate/config/const.go @@ -10,12 +10,12 @@ const ( save = "Save" quit = "Exit" // Create - workloadResources = "Workload resources" - exceptions = "Exceptions" - collector = "Collector" - settings = "Settings" - previousMenu = "\U0001F878" - // Workload resources + certSuiteResources = "resources" + exceptions = "Exceptions" + collector = "Collector" + settings = "Settings" + previousMenu = "\U0001F878" + // CertSuite resources namespaces = "Namespaces" pods = "Pods" operators = "Operators" @@ -41,37 +41,37 @@ const ( // Menu help const ( // Main menu - createConfigHelp = "Create a configuration for the Workload Certification Suite" + createConfigHelp = "Create a configuration for the Certification Suite" showConfigHelp = "Show the current configuration in YAML format" saveConfigHelp = `Save the current configuration to a YAML file (default "certsuite_config.yaml")` exitHelp = "Exit the tool (changes not saved will be lost)" backHelp = "Move to previous menu" // Create - workloadResourcesHelp = `Configure the workload resources of the Workload to be verified. -Only the resources that the Workload uses are required to be configured. The rest can be left empty. + certSuiteResourcesHelp = `Configure the workload resources of the CertSuite to be verified. +Only the resources that the CertSuite uses are required to be configured. The rest can be left empty. Usually a basic configuration includes "Namespaces" and "Pods" at least.` exceptionsdHelp = `Allow adding exceptions to skip several checks for different resources. -The exceptions must be justified in order to pass the Workload Certification. Feedback +The exceptions must be justified in order to pass the CertSuite. Feedback regarding the exceptions configured can be provided in an HTML page after loading the claim.json file with the results.` - collectordHelp = `Parameters required to send the Workload Certification Suite results to a data collector.` - settingsHelp = `Configure various settings for the Workload Certification Suite.` - // Workload resources - namespacesHelp = `The namespaces in which the Workload under test will be deployed.` + collectordHelp = `Parameters required to send the CertSuite Certification Suite results to a data collector.` + settingsHelp = `Configure various settings for the CertSuite Certification Suite.` + // CertSuite resources + namespacesHelp = `The namespaces in which the workload under test will be deployed.` - podLabelsHelp = `The labels that each Pod of the Workload under test must have to be verified -by the Workload Certification Suite. -If a new label is used for this purpose make sure it is added to the Workload's Pods, + podLabelsHelp = `The labels that each Pod of the workload under test must have to be verified +by the Certification Suite. +If a new label is used for this purpose make sure it is added to the workload's Pods, ideally in the pod's definition as the on-the-fly labels are lost if the Pod gets rescheduled. For Pods own by a Deployment, the same label as the one defined in the "spec.selector.matchLabels" section of the Deployment can be used.` - operatorLabelsHelp = `The labels that each operator's CSV of the Workload under test must have to be verified -by the Workload Certification Suite. -If a new label is used for this purpose make sure it is added to the Workload operator's CSVs.` + operatorLabelsHelp = `The labels that each operator's CSV of the workload under test must have to be verified +by the Certification Suite. +If a new label is used for this purpose make sure it is added to the workload operator's CSVs.` - crdFiltersHelp = `The CRD name suffix used to filter the Workload's CRDs among all the CRDs present in the cluster. + crdFiltersHelp = `The CRD name suffix used to filter the workload's CRDs among all the CRDs present in the cluster. It must also be specified if the resources own by the CRD are scalable or not in order to avoid some lifecycle test cases.` managedDeploymentsHelp = `The Deployments managed by a Custom Resource whose scaling is controlled using @@ -85,10 +85,10 @@ The CRD defining that CR should be included in the CRD filters with the scalable property set to true. If so, the test case "lifecycle-statefulset-scaling" will be skipped, otherwise it will fail.` // Exceptions - kernelTaintsHelp = `The list of kernel modules loaded by the Workload that make the Linux kernel mark itself + kernelTaintsHelp = `The list of kernel modules loaded by the workload that make the Linux kernel mark itself as "tainted" but that should skip verification. Test cases affected: platform-alteration-tainted-node-kernel.` - helmChartsHelp = `The list of Helm charts that the Workload uses whose certification status will not be verified. + helmChartsHelp = `The list of Helm charts that the workload uses whose certification status will not be verified. If no exception is configured, the certification status for all Helm charts will be checked in the OpenShift Helms Charts repository (see https://charts.openshift.io/). Test cases affected: affiliated-certification-helmchart-is-certified` @@ -111,25 +111,25 @@ Test cases affected: lifecycle-statefulset-scaling` // Settings debugDaemonSetHelp = `Set the namespace where the debug DaemonSet will be deployed. The namespace will be created in case it does not exist. If not set, the default namespace -is "workload-suite". -This DaemonSet, called "certsuite-debug" is deployed and used internally by the Workload Certification Suite +is "certsuite". +This DaemonSet, called "certsuite-debug" is deployed and used internally by the Certification Suite to issue some shell commands that are needed in certain test cases. Some of these test cases might fail or be skipped in case it is not deployed correctly.` ) // Prompts, syxtax, examples const ( - // Workload resources - namespacePrompt = "Enter a comma-separated list of the namespaces in which the Workload is deploying its workload." + // CertSuite resources + namespacePrompt = "Enter a comma-separated list of the namespaces in which the CertSuite is deploying its workload." namespaceSyntax = "ns1[, ns2]..." namespaceExample = "workload, sample-workload" - podsPrompt = "Enter a comma-separated list of labels to identify the Workload's Pods under test." + podsPrompt = "Enter a comma-separated list of labels to identify the CertSuite's Pods under test." podsSyntax = "pod-label-1[, pod-label-2]..." podsExample = "redhat-best-practices-for-k8s.com/generic: target" - operatorsPrompt = "Enter a comma-separated list of labels to identify the Workload's operators under test." + operatorsPrompt = "Enter a comma-separated list of labels to identify the CertSuite's operators under test." operatorsSyntax = "operator-label-1[, operator-label-2]..." operatorsExample = "redhat-best-practices-for-k8s.com/operator1: target" - crdFiltersPrompt = "Enter a comma-separated list of the CRD's name suffixes that the Workload contains. Also, specify if the\n" + + crdFiltersPrompt = "Enter a comma-separated list of the CRD's name suffixes that the CertSuite contains. Also, specify if the\n" + "resources managed by those CRDs are scalable." crdFiltersSyntax = "crd-name-suffix/{true|false}[,crd-name-suffix/{true|false}]..." crdFiltersExample = "group1.test.com/true" @@ -154,15 +154,15 @@ const ( servicesExample = "hazelcast-platform-controller-manager-service, hazelcast-platform-webhook-service" nonScalableDeploymentsPrompt = "Enter a comma-separated list of Deployments that do not support scaling operations." nonScalableDeploymentsSyntax = "deployment1-name/deployment1-namespace[,deployment2-name/deployment2-namespace]..." - nonScalableDeploymentsExample = "deployment-test/workload-test" + nonScalableDeploymentsExample = "deployment-test/certsuite-test" nonScalableStatefulSetsPrompt = "Enter a comma-separated list of StatefulSets that do not support scaling operations." nonScalableStatefulSetsSyxtax = "statefulset1-name/statefulset1-namespace[,statefulset2-name/statefulset2-namespace]..." - nonScalableStatefulSetsExample = "statefulset-test-test/workload-test" + nonScalableStatefulSetsExample = "statefulset-test-test/certsuite-test" // Collector (TODO) // Settings debugDaemonSetPrompt = "Enter the namespace in which de debug DaemonSet will be deployed." debugDaemonSetSyntax = "ds-namespace" - debugDaemonSetExample = "workload-cert" + debugDaemonSetExample = "certsuite-cert" ) // Internal constants diff --git a/cmd/certsuite/pkg/claim/claim.go b/cmd/certsuite/pkg/claim/claim.go index 77a8e22cd8..235afd48fd 100644 --- a/cmd/certsuite/pkg/claim/claim.go +++ b/cmd/certsuite/pkg/claim/claim.go @@ -83,7 +83,7 @@ type Schema struct { Nodes Nodes `json:"nodes"` RawResults struct { - Workloadcertificationtest struct { + CertSuitecertificationtest struct { Testsuites struct { Testsuite struct { Testcase []TestCaseRawResult `json:"testcase"` diff --git a/cmd/certsuite/run/run.go b/cmd/certsuite/run/run.go index e983442a7f..84c05aa5d8 100644 --- a/cmd/certsuite/run/run.go +++ b/cmd/certsuite/run/run.go @@ -27,7 +27,7 @@ func NewCommand() *cobra.Command { runCmd.PersistentFlags().StringP("output-dir", "o", "results", "The directory where the output artifacts will be placed") runCmd.PersistentFlags().StringP("label-filter", "l", "none", "Label expression to filter test cases (e.g. --label-filter 'access-control && !access-control-sys-admin-capability')") runCmd.PersistentFlags().String("timeout", timeoutFlagDefaultvalue.String(), "Time allowed for the test suite execution to complete (e.g. --timeout 30m or -timeout 1h30m)") - runCmd.PersistentFlags().StringP("config-file", "c", "config/certsuite_config.yml", "The workload configuration file") + runCmd.PersistentFlags().StringP("config-file", "c", "config/certsuite_config.yml", "The certsuite configuration file") runCmd.PersistentFlags().StringP("kubeconfig", "k", "", "The target cluster's Kubeconfig file") runCmd.PersistentFlags().Bool("server-mode", false, "Run the certsuite in web server mode") runCmd.PersistentFlags().Bool("omit-artifacts-zip-file", false, "Prevents the creation of a zip file with the result artifacts") @@ -111,13 +111,13 @@ func runTestSuite(cmd *cobra.Command, _ []string) error { testParams := configuration.GetTestParameters() if testParams.ServerMode { - log.Info("Running Workload Certification Suite in web server mode") + log.Info("Running Certification Suite in web server mode") webserver.StartServer(testParams.OutputDir) } else { - log.Info("Running Workload Certification Suite in stand-alone mode") + log.Info("Running Certification Suite in stand-alone mode") err := certsuite.Run(testParams.LabelsFilter, testParams.OutputDir) if err != nil { - log.Fatal("Failed to run Workload Certification Suite: %v", err) //nolint:gocritic // exitAfterDefer + log.Fatal("Failed to run Certification Suite: %v", err) //nolint:gocritic // exitAfterDefer } } diff --git a/pkg/claimhelper/claimhelper.go b/pkg/claimhelper/claimhelper.go index 8d3d564d19..badfc9dd25 100644 --- a/pkg/claimhelper/claimhelper.go +++ b/pkg/claimhelper/claimhelper.go @@ -130,8 +130,8 @@ func NewClaimBuilder() (*ClaimBuilder, error) { root.Claim.Configurations = claimConfigurations root.Claim.Nodes = GenerateNodes() root.Claim.Versions = &claim.Versions{ - Certsuite: versions.GitDisplayRelease, - CertsuiteGitCommit: versions.GitCommit, + CertSuite: versions.GitDisplayRelease, + CertSuiteGitCommit: versions.GitCommit, OcClient: diagnostics.GetVersionOcClient(), Ocp: diagnostics.GetVersionOcp(), K8s: diagnostics.GetVersionK8s(), diff --git a/pkg/claimhelper/claimhelper_test.go b/pkg/claimhelper/claimhelper_test.go index 59919d3c63..a27f0a9a50 100644 --- a/pkg/claimhelper/claimhelper_test.go +++ b/pkg/claimhelper/claimhelper_test.go @@ -211,7 +211,7 @@ func TestMarshalClaimOutput(t *testing.T) { EndTime: "2023-12-20 14:51:34 -0600 MST", }, Versions: &claim.Versions{ - Certsuite: "1.0.0", + CertSuite: "1.0.0", }, Results: map[string]claim.Result{ "test-case1": { @@ -241,7 +241,7 @@ func TestWriteClaimOutput(t *testing.T) { EndTime: "2023-12-20 14:51:34 -0600 MST", }, Versions: &claim.Versions{ - Certsuite: "1.0.0", + CertSuite: "1.0.0", }, Results: map[string]claim.Result{ "test-case1": { @@ -282,7 +282,7 @@ func TestReadClaimFile(t *testing.T) { EndTime: "2023-12-20 14:51:34 -0600 MST", }, Versions: &claim.Versions{ - Certsuite: "1.0.0", + CertSuite: "1.0.0", }, Results: map[string]claim.Result{ "test-case1": {