Skip to content

Commit

Permalink
feat: Update public client library for Cloud Monitoring to introduce …
Browse files Browse the repository at this point in the history
…new Uptime check feature. Uptime HTTP(S) checks can now be GET or POST (#425)
  • Loading branch information
yoshi-automation authored Apr 23, 2020
1 parent 6b900be commit bd4f7bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions monitoring/snippets/test/alerts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ describe('alerts', () => {
await deleteChannels();
});

it('should replace notification channels', async function() {
it('should replace notification channels', async function () {
this.retries(8);
await delay(this.test);
const stdout = execSync(`${cmd} replace ${policyOneName} ${channelName}`);
assert.include(stdout, 'Updated projects');
assert.include(stdout, policyOneName);
});

it('should disable policies', async function() {
it('should disable policies', async function () {
this.retries(8);
await delay(this.test);
const stdout = execSync(
Expand All @@ -194,7 +194,7 @@ describe('alerts', () => {
assert.include(stdout, policyTwoName);
});

it('should enable policies', async function() {
it('should enable policies', async function () {
this.retries(8);
await delay(this.test);
const stdout = execSync(
Expand All @@ -213,7 +213,7 @@ describe('alerts', () => {
assert.include(stdout, 'second');
});

it('should backup all policies', async function() {
it('should backup all policies', async function () {
this.retries(8);
await delay(this.test);
const output = execSync(`${cmd} backup ${projectId}`);
Expand All @@ -222,7 +222,7 @@ describe('alerts', () => {
await client.deleteAlertPolicy({name: policyOneName});
});

it('should restore policies', async function() {
it('should restore policies', async function () {
this.retries(8);
await delay(this.test);
const output = execSync(`${cmd} restore ${projectId}`);
Expand Down
10 changes: 5 additions & 5 deletions monitoring/snippets/test/metrics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ const delay = async test => {
});
};
describe('metrics', async () => {
it('should create a metric descriptors', async function() {
it('should create a metric descriptors', async function () {
this.retries(8);
await delay(this.test);
const output = execSync(`${cmd} create`);
assert.include(output, 'Created custom Metric');
assert.include(output, `Type: ${customMetricId}`);
});

it('should list metric descriptors, including the new custom one', async function() {
it('should list metric descriptors, including the new custom one', async function () {
this.retries(8);
await delay(this.test);
const output = execSync(`${cmd} list`);
Expand All @@ -64,14 +64,14 @@ describe('metrics', async () => {
assert.include(output, `Type: ${customMetricId}`);
});

it('should write time series data', async function() {
it('should write time series data', async function () {
this.retries(5);
await delay(this.test);
const output = execSync(`${cmd} write`);
assert.include(output, 'Done writing time series data.');
});

it('should delete a metric descriptor', async function() {
it('should delete a metric descriptor', async function () {
this.retries(5);
await delay(this.test);
const output = execSync(`${cmd} delete ${customMetricId}`);
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('metrics', async () => {
});
});

it('should read time series data aggregated', async function() {
it('should read time series data aggregated', async function () {
this.retries(5);
await delay(this.test);
const [timeSeries] = await client.listTimeSeries({
Expand Down
2 changes: 1 addition & 1 deletion monitoring/snippets/test/quickstart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const delay = async test => {
});
};
describe('quickstart', () => {
it('should run the quickstart', async function() {
it('should run the quickstart', async function () {
this.retries(8);
await delay(this.test); // delay the start of the test, if this is a retry.
const result = execSync('node quickstart');
Expand Down

0 comments on commit bd4f7bf

Please sign in to comment.