Skip to content

Commit 818e7ac

Browse files
committed
Fix for #2202
Add 417 statusCode to the header when tests fail or give error for core and app tests.
1 parent 598b1d3 commit 818e7ac

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

tests/runner.cfm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@
117117
}
118118
119119
result = testBox.run(argumentCollection = testBoxOptions);
120+
DeJsonResult = DeserializeJSON(result);
121+
122+
if (DeJsonResult.totalFail > 0 || DeJsonResult.totalError > 0) {
123+
cfheader(statuscode=417);
124+
} else {
125+
cfheader(statuscode=200);
126+
}
120127
}
121128
else if(url.format eq "json"){
122129
// Set JSON reporter

vendor/wheels/tests/runner.cfm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@
120120
result = testBox.run(
121121
reporter = "wheels.wheelstest.system.reports.JSONReporter"
122122
);
123+
DeJsonResult = DeserializeJSON(result);
124+
125+
if (DeJsonResult.totalFail > 0 || DeJsonResult.totalError > 0) {
126+
cfheader(statuscode=417);
127+
} else {
128+
cfheader(statuscode=200);
129+
}
123130
}
124131
else if(url.format eq "json"){
125132
result = testBox.run(

0 commit comments

Comments
 (0)