Skip to content

Commit

Permalink
skip purchase phone number sample in smoke testing (Azure#13198)
Browse files Browse the repository at this point in the history
  • Loading branch information
0rland0Wats0n committed Jan 13, 2021
1 parent dd6ac8c commit 90d62de
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions sdk/communication/communication-administration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,10 @@
"sinon": "^9.0.2",
"typescript": "4.1.2",
"typedoc": "0.15.0"
},
"//smokeTestConfiguration": {
"skip": [
"purchasePhoneNumber.js"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ async function main() {
// poll until phone number reservation is made
const reservation = await reservationPoller.pollUntilDone();

console.log("Phone number reserved for purchase.");
console.log(`Reservation: ${JSON.stringify(reservation)}`);

if (reservation.reservationId && reservation.phoneNumbers && reservation.phoneNumbers.length) {
console.log("Phone number reserved for purchase.");
console.log(`Reservation: ${JSON.stringify(reservation)}`);

const phoneNumber = reservation.phoneNumbers[0];

// create purchase poller
Expand All @@ -58,7 +58,7 @@ async function main() {

console.log(`Phone number, ${phoneNumber}, purchased successfully.`);
} else {
throw new Error("No phone numbers found.");
console.log("No phone number found matching request.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export const main = async () => {
// poll until phone number reservation is made
const reservation = await reservationPoller.pollUntilDone();

console.log("Phone number reserved for purchase.");
console.log(`Reservation: ${JSON.stringify(reservation)}`);

if (reservation.reservationId && reservation.phoneNumbers && reservation.phoneNumbers.length) {
console.log("Phone number reserved for purchase.");
console.log(`Reservation: ${JSON.stringify(reservation)}`);

const phoneNumber = reservation.phoneNumbers[0];

// create purchase poller
Expand All @@ -62,7 +62,7 @@ export const main = async () => {

console.log(`Phone number, ${phoneNumber}, purchased successfully.`);
} else {
throw new Error("No phone numbers found.");
console.log("No phone number found matching request.");
}
};

Expand Down

0 comments on commit 90d62de

Please sign in to comment.