Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
fix: regenerate unit tests (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored May 6, 2020
1 parent 643a60a commit 4593117
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 248 deletions.
14 changes: 3 additions & 11 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@
{
"git": {
"name": ".",
"remote": "https://github.com/googleapis/nodejs-datacatalog.git",
"sha": "70c23c2b609bd24901dc902090e23fbf92b55895"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab",
"internalRef": "307114445"
"remote": "git@github.com:googleapis/nodejs-datacatalog.git",
"sha": "643a60abe75de340f00999a253ba8da10c544e6e"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d"
"sha": "ab883569eb0257bbf16a6d825fd018b3adde3912"
}
}
],
Expand Down
136 changes: 43 additions & 93 deletions test/gapic_data_catalog_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.createEntryGroup(request);
}, expectedError);
await assert.rejects(client.createEntryGroup(request), expectedError);
assert(
(client.innerApiCalls.createEntryGroup as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -411,9 +409,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.getEntryGroup(request);
}, expectedError);
await assert.rejects(client.getEntryGroup(request), expectedError);
assert(
(client.innerApiCalls.getEntryGroup as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -528,9 +524,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.updateEntryGroup(request);
}, expectedError);
await assert.rejects(client.updateEntryGroup(request), expectedError);
assert(
(client.innerApiCalls.updateEntryGroup as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -642,9 +636,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.deleteEntryGroup(request);
}, expectedError);
await assert.rejects(client.deleteEntryGroup(request), expectedError);
assert(
(client.innerApiCalls.deleteEntryGroup as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -756,9 +748,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.createEntry(request);
}, expectedError);
await assert.rejects(client.createEntry(request), expectedError);
assert(
(client.innerApiCalls.createEntry as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -873,9 +863,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.updateEntry(request);
}, expectedError);
await assert.rejects(client.updateEntry(request), expectedError);
assert(
(client.innerApiCalls.updateEntry as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -987,9 +975,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.deleteEntry(request);
}, expectedError);
await assert.rejects(client.deleteEntry(request), expectedError);
assert(
(client.innerApiCalls.deleteEntry as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1098,9 +1084,7 @@ describe('v1.DataCatalogClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.getEntry = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.getEntry(request);
}, expectedError);
await assert.rejects(client.getEntry(request), expectedError);
assert(
(client.innerApiCalls.getEntry as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1188,9 +1172,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.lookupEntry(request);
}, expectedError);
await assert.rejects(client.lookupEntry(request), expectedError);
assert(
(client.innerApiCalls.lookupEntry as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1302,9 +1284,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.createTagTemplate(request);
}, expectedError);
await assert.rejects(client.createTagTemplate(request), expectedError);
assert(
(client.innerApiCalls.createTagTemplate as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1416,9 +1396,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.getTagTemplate(request);
}, expectedError);
await assert.rejects(client.getTagTemplate(request), expectedError);
assert(
(client.innerApiCalls.getTagTemplate as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1533,9 +1511,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.updateTagTemplate(request);
}, expectedError);
await assert.rejects(client.updateTagTemplate(request), expectedError);
assert(
(client.innerApiCalls.updateTagTemplate as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1647,9 +1623,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.deleteTagTemplate(request);
}, expectedError);
await assert.rejects(client.deleteTagTemplate(request), expectedError);
assert(
(client.innerApiCalls.deleteTagTemplate as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1763,9 +1737,10 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.createTagTemplateField(request);
}, expectedError);
await assert.rejects(
client.createTagTemplateField(request),
expectedError
);
assert(
(client.innerApiCalls.createTagTemplateField as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1879,9 +1854,10 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.updateTagTemplateField(request);
}, expectedError);
await assert.rejects(
client.updateTagTemplateField(request),
expectedError
);
assert(
(client.innerApiCalls.updateTagTemplateField as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -1995,9 +1971,10 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.renameTagTemplateField(request);
}, expectedError);
await assert.rejects(
client.renameTagTemplateField(request),
expectedError
);
assert(
(client.innerApiCalls.renameTagTemplateField as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2111,9 +2088,10 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.deleteTagTemplateField(request);
}, expectedError);
await assert.rejects(
client.deleteTagTemplateField(request),
expectedError
);
assert(
(client.innerApiCalls.deleteTagTemplateField as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2222,9 +2200,7 @@ describe('v1.DataCatalogClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.createTag(request);
}, expectedError);
await assert.rejects(client.createTag(request), expectedError);
assert(
(client.innerApiCalls.createTag as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2336,9 +2312,7 @@ describe('v1.DataCatalogClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.updateTag(request);
}, expectedError);
await assert.rejects(client.updateTag(request), expectedError);
assert(
(client.innerApiCalls.updateTag as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2447,9 +2421,7 @@ describe('v1.DataCatalogClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.deleteTag(request);
}, expectedError);
await assert.rejects(client.deleteTag(request), expectedError);
assert(
(client.innerApiCalls.deleteTag as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2561,9 +2533,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.setIamPolicy(request);
}, expectedError);
await assert.rejects(client.setIamPolicy(request), expectedError);
assert(
(client.innerApiCalls.setIamPolicy as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2675,9 +2645,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.getIamPolicy(request);
}, expectedError);
await assert.rejects(client.getIamPolicy(request), expectedError);
assert(
(client.innerApiCalls.getIamPolicy as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2791,9 +2759,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.testIamPermissions(request);
}, expectedError);
await assert.rejects(client.testIamPermissions(request), expectedError);
assert(
(client.innerApiCalls.testIamPermissions as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2899,9 +2865,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.searchCatalog(request);
}, expectedError);
await assert.rejects(client.searchCatalog(request), expectedError);
assert(
(client.innerApiCalls.searchCatalog as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -2991,9 +2955,7 @@ describe('v1.DataCatalogClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.searchCatalog.createStream as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -3185,9 +3147,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.listEntryGroups(request);
}, expectedError);
await assert.rejects(client.listEntryGroups(request), expectedError);
assert(
(client.innerApiCalls.listEntryGroups as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -3284,9 +3244,7 @@ describe('v1.DataCatalogClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.listEntryGroups.createStream as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -3491,9 +3449,7 @@ describe('v1.DataCatalogClient', () => {
undefined,
expectedError
);
await assert.rejects(async () => {
await client.listEntries(request);
}, expectedError);
await assert.rejects(client.listEntries(request), expectedError);
assert(
(client.innerApiCalls.listEntries as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -3583,9 +3539,7 @@ describe('v1.DataCatalogClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.listEntries.createStream as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -3780,9 +3734,7 @@ describe('v1.DataCatalogClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError);
await assert.rejects(async () => {
await client.listTags(request);
}, expectedError);
await assert.rejects(client.listTags(request), expectedError);
assert(
(client.innerApiCalls.listTags as SinonStub)
.getCall(0)
Expand Down Expand Up @@ -3871,9 +3823,7 @@ describe('v1.DataCatalogClient', () => {
reject(err);
});
});
await assert.rejects(async () => {
await promise;
}, expectedError);
await assert.rejects(promise, expectedError);
assert(
(client.descriptors.page.listTags.createStream as SinonStub)
.getCall(0)
Expand Down
Loading

0 comments on commit 4593117

Please sign in to comment.