Skip to content

Commit b91df55

Browse files
committed
address review's comments
Signed-off-by: Mattia Lavacca <[email protected]>
1 parent e20f560 commit b91df55

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

conformance/utils/suite/experimental_reports.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,21 @@ func isTestExtended(profile ConformanceProfile, test ConformanceTest) bool {
187187
}
188188

189189
// buildSummary creates a human-readable message about each profile's test outcomes.
190-
func buildSummary(report confv1a1.ProfileReport) string {
191-
reportMessage := fmt.Sprintf("Core tests %s", buildReportMessage(report.Core))
190+
func buildSummary(report confv1a1.ProfileReport) (reportSummary string) {
191+
reportSummary = fmt.Sprintf("Core tests %s", buildReportSummary(report.Core))
192192
if report.Extended != nil {
193-
reportMessage = fmt.Sprintf("%s. Extended tests %s", reportMessage, buildReportMessage(report.Extended.Status))
193+
reportSummary = fmt.Sprintf("%s. Extended tests %s", reportSummary, buildReportSummary(report.Extended.Status))
194194
}
195-
return fmt.Sprintf("%s.", reportMessage)
195+
return fmt.Sprintf("%s.", reportSummary)
196196
}
197197

198-
func buildReportMessage(status confv1a1.Status) string {
198+
func buildReportSummary(status confv1a1.Status) string {
199199
var message string
200200
switch status.Result {
201201
case confv1a1.Success:
202-
message = "succedeed"
202+
message = "succeeded"
203203
case confv1a1.Partial:
204-
message = fmt.Sprintf("partially succedeed with %d test skips", status.Statistics.Skipped)
204+
message = fmt.Sprintf("partially succeeded with %d test skips", status.Statistics.Skipped)
205205
case confv1a1.Failure:
206206
message = fmt.Sprintf("failed with %d test failures", status.Statistics.Failed)
207207
}

conformance/utils/suite/experimental_reports_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestBuildSummary(t *testing.T) {
4545
expectedSummary: "Core tests failed with 3 test failures.",
4646
},
4747
{
48-
name: "core tests succedeed, extended tests failed",
48+
name: "core tests succeeded, extended tests failed",
4949
report: confv1a1.ProfileReport{
5050
Name: string(HTTPConformanceProfileName),
5151
Core: confv1a1.Status{
@@ -64,10 +64,10 @@ func TestBuildSummary(t *testing.T) {
6464
},
6565
},
6666
},
67-
expectedSummary: "Core tests succedeed. Extended tests failed with 1 test failures.",
67+
expectedSummary: "Core tests succeeded. Extended tests failed with 1 test failures.",
6868
},
6969
{
70-
name: "core tests partially succedeed, extended tests succedeed",
70+
name: "core tests partially succeeded, extended tests succeeded",
7171
report: confv1a1.ProfileReport{
7272
Name: string(HTTPConformanceProfileName),
7373
Core: confv1a1.Status{
@@ -86,10 +86,10 @@ func TestBuildSummary(t *testing.T) {
8686
},
8787
},
8888
},
89-
expectedSummary: "Core tests partially succedeed with 2 test skips. Extended tests succedeed.",
89+
expectedSummary: "Core tests partially succeeded with 2 test skips. Extended tests succeeded.",
9090
},
9191
{
92-
name: "core tests succedeed, extended tests partially succedeed",
92+
name: "core tests succeeded, extended tests partially succeeded",
9393
report: confv1a1.ProfileReport{
9494
Name: string(HTTPConformanceProfileName),
9595
Core: confv1a1.Status{
@@ -108,7 +108,7 @@ func TestBuildSummary(t *testing.T) {
108108
},
109109
},
110110
},
111-
expectedSummary: "Core tests succedeed. Extended tests partially succedeed with 1 test skips.",
111+
expectedSummary: "Core tests succeeded. Extended tests partially succeeded with 1 test skips.",
112112
},
113113
}
114114

0 commit comments

Comments
 (0)