Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for no traffic #2251

Merged
merged 1 commit into from
Jan 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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