Skip to content

Commit

Permalink
chore: new owl bot post processor docker image (#40)
Browse files Browse the repository at this point in the history
gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
  • Loading branch information
gcf-owl-bot[bot] authored May 10, 2021
1 parent aa5186f commit 8fdb3ad
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 32 deletions.
10 changes: 5 additions & 5 deletions packages/google-cloud-policytroubleshooter/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions packages/google-cloud-policytroubleshooter/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,14 @@ export class IamCheckerClient {
const iamCheckerStubMethods = ['troubleshootIamPolicy'];
for (const methodName of iamCheckerStubMethods) {
const callPromise = this.iamCheckerStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import * as iamcheckerModule from '../src';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -145,9 +144,8 @@ describe('v1.IamCheckerClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse()
);
client.innerApiCalls.troubleshootIamPolicy = stubSimpleCall(
expectedResponse
);
client.innerApiCalls.troubleshootIamPolicy =
stubSimpleCall(expectedResponse);
const [response] = await client.troubleshootIamPolicy(request);
assert.deepStrictEqual(response, expectedResponse);
assert(
Expand All @@ -170,9 +168,8 @@ describe('v1.IamCheckerClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse()
);
client.innerApiCalls.troubleshootIamPolicy = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.troubleshootIamPolicy =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.troubleshootIamPolicy(
request,
Expand Down

0 comments on commit 8fdb3ad

Please sign in to comment.