Skip to content

Commit

Permalink
fix: regen protos and tests, formatting (#991)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster committed May 8, 2020
1 parent d3517ee commit e350b97
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 116 deletions.
14 changes: 3 additions & 11 deletions synth.metadata
Expand Up @@ -3,23 +3,15 @@
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/nodejs-pubsub.git",
"sha": "aef28daccfbf0be39c740bde6cdd51a499571555"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab",
"internalRef": "307114445"
"remote": "git@github.com:googleapis/nodejs-pubsub.git",
"sha": "2e973a55008c4d50ef3f7d47ac4ba761cd2ea9cb"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "f5e4c17dc78a966dbf29961dd01f9bbd63e20a04"
"sha": "ab883569eb0257bbf16a6d825fd018b3adde3912"
}
}
],
Expand Down
68 changes: 26 additions & 42 deletions test/gapic_publisher_v1.ts
Expand Up @@ -297,9 +297,7 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.createTopic(request);
}, expectedError);
await assert.rejects(client.createTopic(request), expectedError);
assert(
(client.innerApiCalls.createTopic as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -414,9 +412,7 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.updateTopic(request);
}, expectedError);
await assert.rejects(client.updateTopic(request), expectedError);
assert(
(client.innerApiCalls.updateTopic as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -525,9 +521,7 @@ describe('v1.PublisherClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.publish = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.publish(request);
}, expectedError);
await assert.rejects(client.publish(request), expectedError);
assert(
(client.innerApiCalls.publish as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -636,9 +630,7 @@ describe('v1.PublisherClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.getTopic = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.getTopic(request);
}, expectedError);
await assert.rejects(client.getTopic(request), expectedError);
assert(
(client.innerApiCalls.getTopic as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -750,9 +742,7 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.deleteTopic(request);
}, expectedError);
await assert.rejects(client.deleteTopic(request), expectedError);
assert(
(client.innerApiCalls.deleteTopic as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -868,9 +858,7 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.listTopics(request);
}, expectedError);
await assert.rejects(client.listTopics(request), expectedError);
assert(
(client.innerApiCalls.listTopics as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -954,9 +942,7 @@ describe('v1.PublisherClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.listTopics.createStream as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1145,9 +1131,10 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.listTopicSubscriptions(request);
}, expectedError);
await assert.rejects(
client.listTopicSubscriptions(request),
expectedError
);
assert(
(client.innerApiCalls.listTopicSubscriptions as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1229,9 +1216,7 @@ describe('v1.PublisherClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.listTopicSubscriptions
.createStream as SinonStub)
Expand Down Expand Up @@ -1418,9 +1403,7 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.listTopicSnapshots(request);
}, expectedError);
await assert.rejects(client.listTopicSnapshots(request), expectedError);
assert(
(client.innerApiCalls.listTopicSnapshots as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1501,9 +1484,7 @@ describe('v1.PublisherClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.listTopicSnapshots.createStream as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1685,9 +1666,10 @@ describe('v1.PublisherClient', () => {
};
const expectedError = new Error('expected');
client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.getIamPolicy(request, expectedOptions);
}, expectedError);
await assert.rejects(
client.getIamPolicy(request, expectedOptions),
expectedError
);
assert(
(client.iamClient.getIamPolicy as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1790,9 +1772,10 @@ describe('v1.PublisherClient', () => {
};
const expectedError = new Error('expected');
client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.setIamPolicy(request, expectedOptions);
}, expectedError);
await assert.rejects(
client.setIamPolicy(request, expectedOptions),
expectedError
);
assert(
(client.iamClient.setIamPolicy as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1901,9 +1884,10 @@ describe('v1.PublisherClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.testIamPermissions(request, expectedOptions);
}, expectedError);
await assert.rejects(
client.testIamPermissions(request, expectedOptions),
expectedError
);
assert(
(client.iamClient.testIamPermissions as SinonStub)
.getCall(0)
Expand Down

0 comments on commit e350b97

Please sign in to comment.