Skip to content

Commit

Permalink
test: use fully qualified request type name in tests (#114)
Browse files Browse the repository at this point in the history
* test: use fully qualified request type name in tests

PiperOrigin-RevId: 475685359

Source-Link: googleapis/googleapis@7a12973

Source-Link: googleapis/googleapis-gen@370c729
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 23, 2022
1 parent d0ef234 commit 768a427
Show file tree
Hide file tree
Showing 2 changed files with 334 additions and 245 deletions.
181 changes: 108 additions & 73 deletions packages/google-api-serviceusage/test/gapic_service_usage_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.GetServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('GetServiceRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.GetServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -295,7 +298,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.GetServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('GetServiceRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.GetServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -339,7 +345,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.GetServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('GetServiceRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.GetServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -367,7 +376,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.GetServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('GetServiceRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.GetServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -385,9 +397,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchGetServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchGetServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchGetServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -415,9 +428,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchGetServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchGetServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchGetServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -461,9 +475,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchGetServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchGetServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchGetServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -491,9 +506,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchGetServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchGetServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchGetServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -511,9 +527,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.EnableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('EnableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.EnableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -543,9 +560,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.EnableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('EnableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.EnableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -596,9 +614,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.EnableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('EnableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.EnableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -626,9 +645,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.EnableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('EnableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.EnableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -701,9 +721,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.DisableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('DisableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.DisableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -733,9 +754,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.DisableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('DisableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.DisableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -786,9 +808,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.DisableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('DisableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.DisableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -816,9 +839,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.DisableServiceRequest()
);
const defaultValue1 = getTypeDefaultValue('DisableServiceRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.DisableServiceRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -891,9 +915,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchEnableServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchEnableServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchEnableServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -923,9 +948,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchEnableServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchEnableServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchEnableServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -976,9 +1002,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchEnableServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchEnableServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchEnableServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -1006,9 +1033,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.BatchEnableServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('BatchEnableServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.BatchEnableServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -1081,9 +1109,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -1113,9 +1142,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -1161,9 +1191,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -1191,9 +1222,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -1244,9 +1276,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -1294,9 +1327,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -1336,9 +1370,10 @@ describe('v1.ServiceUsageClient', () => {
const request = generateSampleMessage(
new protos.google.api.serviceusage.v1.ListServicesRequest()
);
const defaultValue1 = getTypeDefaultValue('ListServicesRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.serviceusage.v1.ListServicesRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down
Loading

0 comments on commit 768a427

Please sign in to comment.