Skip to content

Commit

Permalink
address minor grammatical/spelling errors in 'report-creator'
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Wheeler-Robinson <cwheeler@redhat.com>
  • Loading branch information
crwr45 committed Jun 14, 2024
1 parent 8d7d3c0 commit 860b8fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions addon-tools/report-creator/report/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ func createDiffsSuite(output compare.Output) junit.TestSuite {
}

for _, diff := range *output.Diffs {
testcase := junit.TestCase{
testCase := junit.TestCase{
Name: fmt.Sprintf("CR: %s", diff.CRName),
Classname: fmt.Sprintf("Matching Reference CR: %s", diff.CorrelatedTemplate),
}

if diff.DiffOutput != "None" {
testcase.Failure = &junit.Failure{
testCase.Failure = &junit.Failure{
Type: "Difference",
Message: fmt.Sprintf("Differences found in CR: %s, Compared To Reference CR: %s", diff.CRName, diff.CorrelatedTemplate),
Contents: diff.DiffOutput,
}
}

diffSuite.TestCases = append(diffSuite.TestCases, testcase)
diffSuite.TestCases = append(diffSuite.TestCases, testCase)
}

return diffSuite
Expand All @@ -87,7 +87,7 @@ func createMissingCRsSuite(summary compare.Summary) junit.TestSuite {
for _, cr := range componentCRs {
suite.TestCases = append(suite.TestCases, junit.TestCase{
Name: fmt.Sprintf("Missing CR: %s", cr),
Classname: fmt.Sprintf("Part:%s Compomnet: %s", partName, componentName),
Classname: fmt.Sprintf("Part:%s Component: %s", partName, componentName),
Failure: &junit.Failure{
Type: "Missing Cluster CR",
Message: fmt.Sprintf("Required CR by the reference %q is missing from cluster", cr),
Expand Down Expand Up @@ -137,7 +137,7 @@ func createUnmatchedSuite(summary compare.Summary) junit.TestSuite {
// If no unmatched CRs are found, include a single test case indicating all CRs are matched
if len(summary.UnmatchedCRS) == 0 {
unmatchedSuite.TestCases = append(unmatchedSuite.TestCases, junit.TestCase{
Name: "All CLuster CRs are matched to reference CRs ",
Name: "All Cluster CRs are matched to reference CRs ",
})
unmatchedSuite.Tests = 1
return unmatchedSuite
Expand Down
2 changes: 1 addition & 1 deletion addon-tools/report-creator/report/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestCompareRun(t *testing.T) {

err = cmd.RunE(cmd, []string{})
if err != nil {
t.Fatalf("unexpected error occured in test %s, erorr: %s", test.name, err)
t.Fatalf("unexpected error occurred in test %s, error: %s", test.name, err)
}

actualOutput, err := os.ReadFile(outputPath)
Expand Down

0 comments on commit 860b8fa

Please sign in to comment.