Skip to content

Commit

Permalink
Check for no total traffic for live validation (#2251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Barosan authored Jan 11, 2018
1 parent 894d0d8 commit 7fe4a12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/liveValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ async function runScript() {
}

console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
if (failingOperations.length > 0 || noTrafficOperations.length > 0) {
if (validationResult.totalOperationCount === 0) {
console.log(`There was no traffic detected for the provided RP and API version:${resourceProvider}-${apiVersion}. Please make sure there is traffic so the changes can be validated.`);
} else if (failingOperations.length > 0 || noTrafficOperations.length > 0) {
console.log(`The changes in the specs introduced by this PR potentially do not reflect the Service API.`);

console.log(`Active traffic and success rate > ${successThreshold}% FOR EACH OPERATION is required. Please review the following operations before moving forward.`);
Expand All @@ -116,7 +118,7 @@ async function runScript() {
`);
process.exitCode = 1;
} else {
console.log(`SUCCESS RATE: ${validationResult.SuccessRate} > ${successThreshold}. You can move forward:`);
console.log(`SUCCESS RATE: ${validationResult.successRate} > ${successThreshold}. You can move forward.`);
}
}

Expand Down

1 comment on commit 7fe4a12

@AutorestCI
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was treated and no generation was made for Python

Please sign in to comment.