Skip to content

Commit

Permalink
build: use fully qualified request type name in tests (#190)
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 22, 2022
1 parent bd2145b commit d073994
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest()
);
request.workload ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateWorkloadRequest', [
'workload',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest',
['workload', 'name']
);
request.workload.name = defaultValue1;
const expectedHeaderRequestParams = `workload.name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -314,10 +314,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest()
);
request.workload ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateWorkloadRequest', [
'workload',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest',
['workload', 'name']
);
request.workload.name = defaultValue1;
const expectedHeaderRequestParams = `workload.name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -363,10 +363,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest()
);
request.workload ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateWorkloadRequest', [
'workload',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest',
['workload', 'name']
);
request.workload.name = defaultValue1;
const expectedHeaderRequestParams = `workload.name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -396,10 +396,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest()
);
request.workload ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateWorkloadRequest', [
'workload',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest',
['workload', 'name']
);
request.workload.name = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -418,9 +418,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('DeleteWorkloadRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -449,9 +450,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('DeleteWorkloadRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -496,9 +498,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('DeleteWorkloadRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -527,9 +530,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('DeleteWorkloadRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -548,7 +552,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('GetWorkloadRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.GetWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -577,7 +584,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('GetWorkloadRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.GetWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -622,7 +632,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('GetWorkloadRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.GetWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -651,7 +664,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('GetWorkloadRequest', ['name']);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.GetWorkloadRequest',
['name']
);
request.name = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -670,9 +686,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateWorkloadRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.CreateWorkloadRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -703,9 +720,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateWorkloadRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.CreateWorkloadRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -757,9 +775,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateWorkloadRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.CreateWorkloadRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -788,9 +807,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateWorkloadRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.CreateWorkloadRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -866,9 +886,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -905,9 +926,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -960,9 +982,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -991,9 +1014,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -1052,9 +1076,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -1102,9 +1127,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -1151,9 +1177,10 @@ describe('v1.AssuredWorkloadsServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListWorkloadsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.assuredworkloads.v1.ListWorkloadsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down
Loading

0 comments on commit d073994

Please sign in to comment.