@@ -54,16 +54,21 @@ function ginkgoOutputPattern(storageType) {
5454}
5555
5656const stageMessage = {
57- bootstrap : "BOOTSTRAP CLUSTER" ,
57+ " bootstrap" : "BOOTSTRAP CLUSTER" ,
5858 "configure-sdn" : "CONFIGURE SDN" ,
5959 "storage-setup" : "STORAGE SETUP" ,
6060 "virtualization-setup" : "VIRTUALIZATION SETUP" ,
6161 "e2e-test" : "E2E TEST" ,
62- ready : "CLUSTER READY" ,
62+ " ready" : "CLUSTER READY" ,
6363 "artifact-missing" : "TEST REPORTS NOT FOUND" ,
6464} ;
6565
66- const clusterSetupStages = [ "bootstrap" , "configure-sdn" , "storage-setup" , "virtualization-setup" ] ;
66+ const clusterSetupStages = [
67+ "bootstrap" ,
68+ "configure-sdn" ,
69+ "storage-setup" ,
70+ "virtualization-setup" ,
71+ ] ;
6772
6873function zeroMetrics ( ) {
6974 return {
@@ -129,7 +134,12 @@ function buildClusterStatus(stageResults) {
129134 } ;
130135}
131136
132- function buildTestStatus ( testResult , reportSource , clusterStatus , metrics = { } ) {
137+ function buildTestStatus (
138+ testResult ,
139+ reportSource ,
140+ clusterStatus ,
141+ metrics = { }
142+ ) {
133143 const stageLabel = stageMessage [ "e2e-test" ] ;
134144
135145 if ( clusterStatus . status !== "success" ) {
@@ -143,13 +153,20 @@ function buildTestStatus(testResult, reportSource, clusterStatus, metrics = {})
143153 const normalizedResult = normalizeJobResult ( testResult ) ;
144154
145155 if ( reportSource === "ginkgo-json" || reportSource === "ginkgo-output" ) {
146- const hasReportedFailures = Number ( metrics . failed || 0 ) > 0 || Number ( metrics . errors || 0 ) > 0 ;
147- const status = normalizedResult === "success" && hasReportedFailures ? "failure" : normalizedResult ;
156+ const hasReportedFailures =
157+ Number ( metrics . failed || 0 ) > 0 || Number ( metrics . errors || 0 ) > 0 ;
158+ const status =
159+ normalizedResult === "success" && hasReportedFailures
160+ ? "failure"
161+ : normalizedResult ;
148162
149163 return {
150164 status,
151165 reason : status === "success" ? "" : "ginkgo-failed" ,
152- message : status === "success" ? "✅ E2E TESTS PASSED" : buildStatusMessage ( status , stageLabel ) ,
166+ message :
167+ status === "success"
168+ ? "✅ E2E TESTS PASSED"
169+ : buildStatusMessage ( status , stageLabel ) ,
153170 } ;
154171 }
155172
@@ -218,7 +235,8 @@ function buildReportSummary(storageType, clusterStatus, testStatus) {
218235
219236 return {
220237 failedStage : testStatus . status === "success" ? "success" : "e2e-test" ,
221- failedStageLabel : testStatus . status === "success" ? "SUCCESS" : stageMessage [ "e2e-test" ] ,
238+ failedStageLabel :
239+ testStatus . status === "success" ? "SUCCESS" : stageMessage [ "e2e-test" ] ,
222240 failedJobName : `E2E test (${ storageType } )` ,
223241 reportKind : "tests" ,
224242 status : testStatus . status ,
@@ -238,7 +256,10 @@ function isMissingReport(report) {
238256
239257function isClusterFailureReport ( report ) {
240258 if ( report . clusterStatus ) {
241- return report . clusterStatus . status !== "success" && report . clusterStatus . status !== "missing" ;
259+ return (
260+ report . clusterStatus . status !== "success" &&
261+ report . clusterStatus . status !== "missing"
262+ ) ;
242263 }
243264
244265 return report . reportKind !== "tests" && ! isMissingReport ( report ) ;
@@ -250,7 +271,10 @@ function isTestResultReport(report) {
250271 }
251272
252273 if ( report . testStatus ) {
253- return report . testStatus . status !== "not-run" && report . testStatus . status !== "missing" ;
274+ return (
275+ report . testStatus . status !== "not-run" &&
276+ report . testStatus . status !== "missing"
277+ ) ;
254278 }
255279
256280 return report . reportKind === "tests" ;
0 commit comments