Skip to content

Commit

Permalink
test: use fully qualified request type name in tests (#159)
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 4216c6d commit 6c28415
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ describe('v1.QuotaControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.AllocateQuotaRequest()
);
const defaultValue1 = getTypeDefaultValue('AllocateQuotaRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.AllocateQuotaRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -204,9 +205,10 @@ describe('v1.QuotaControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.AllocateQuotaRequest()
);
const defaultValue1 = getTypeDefaultValue('AllocateQuotaRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.AllocateQuotaRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -250,9 +252,10 @@ describe('v1.QuotaControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.AllocateQuotaRequest()
);
const defaultValue1 = getTypeDefaultValue('AllocateQuotaRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.AllocateQuotaRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -280,9 +283,10 @@ describe('v1.QuotaControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.AllocateQuotaRequest()
);
const defaultValue1 = getTypeDefaultValue('AllocateQuotaRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.AllocateQuotaRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand All @@ -203,9 +204,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -247,9 +249,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand All @@ -273,9 +276,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -293,9 +297,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -323,9 +328,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -369,9 +375,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand All @@ -396,9 +403,10 @@ describe('v1.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v1.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v1.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand All @@ -203,9 +204,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -247,9 +249,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand All @@ -273,9 +276,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.CheckRequest()
);
const defaultValue1 = getTypeDefaultValue('CheckRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.CheckRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -293,9 +297,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -323,9 +328,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -369,9 +375,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedHeaderRequestParams = `service_name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand All @@ -396,9 +403,10 @@ describe('v2.ServiceControllerClient', () => {
const request = generateSampleMessage(
new protos.google.api.servicecontrol.v2.ReportRequest()
);
const defaultValue1 = getTypeDefaultValue('ReportRequest', [
'serviceName',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.api.servicecontrol.v2.ReportRequest',
['serviceName']
);
request.serviceName = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand Down

0 comments on commit 6c28415

Please sign in to comment.