Skip to content

Commit

Permalink
build: use fully qualified request type name in tests (#576)
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 3e3130e commit f7b6240
Show file tree
Hide file tree
Showing 2 changed files with 447 additions and 311 deletions.
137 changes: 76 additions & 61 deletions packages/google-cloud-kms/test/gapic_ekm_service_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.GetEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('GetEkmConnectionRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.GetEkmConnectionRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -265,9 +266,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.GetEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('GetEkmConnectionRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.GetEkmConnectionRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -311,9 +313,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.GetEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('GetEkmConnectionRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.GetEkmConnectionRequest',
['name']
);
request.name = defaultValue1;
const expectedHeaderRequestParams = `name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -341,9 +344,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.GetEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('GetEkmConnectionRequest', [
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.GetEkmConnectionRequest',
['name']
);
request.name = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -361,9 +365,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.CreateEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateEkmConnectionRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.CreateEkmConnectionRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -392,9 +397,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.CreateEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateEkmConnectionRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.CreateEkmConnectionRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -438,9 +444,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.CreateEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateEkmConnectionRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.CreateEkmConnectionRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -468,9 +475,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.CreateEkmConnectionRequest()
);
const defaultValue1 = getTypeDefaultValue('CreateEkmConnectionRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.CreateEkmConnectionRequest',
['parent']
);
request.parent = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -489,10 +497,10 @@ describe('v1.EkmServiceClient', () => {
new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest()
);
request.ekmConnection ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateEkmConnectionRequest', [
'ekmConnection',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.UpdateEkmConnectionRequest',
['ekmConnection', 'name']
);
request.ekmConnection.name = defaultValue1;
const expectedHeaderRequestParams = `ekm_connection.name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -522,10 +530,10 @@ describe('v1.EkmServiceClient', () => {
new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest()
);
request.ekmConnection ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateEkmConnectionRequest', [
'ekmConnection',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.UpdateEkmConnectionRequest',
['ekmConnection', 'name']
);
request.ekmConnection.name = defaultValue1;
const expectedHeaderRequestParams = `ekm_connection.name=${defaultValue1}`;
const expectedResponse = generateSampleMessage(
Expand Down Expand Up @@ -570,10 +578,10 @@ describe('v1.EkmServiceClient', () => {
new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest()
);
request.ekmConnection ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateEkmConnectionRequest', [
'ekmConnection',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.UpdateEkmConnectionRequest',
['ekmConnection', 'name']
);
request.ekmConnection.name = defaultValue1;
const expectedHeaderRequestParams = `ekm_connection.name=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -602,10 +610,10 @@ describe('v1.EkmServiceClient', () => {
new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest()
);
request.ekmConnection ??= {};
const defaultValue1 = getTypeDefaultValue('UpdateEkmConnectionRequest', [
'ekmConnection',
'name',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.UpdateEkmConnectionRequest',
['ekmConnection', 'name']
);
request.ekmConnection.name = defaultValue1;
const expectedError = new Error('The client has already been closed.');
client.close();
Expand All @@ -623,9 +631,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -656,9 +665,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -704,9 +714,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -734,9 +745,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -787,9 +799,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down Expand Up @@ -835,9 +848,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedResponse = [
Expand Down Expand Up @@ -877,9 +891,10 @@ describe('v1.EkmServiceClient', () => {
const request = generateSampleMessage(
new protos.google.cloud.kms.v1.ListEkmConnectionsRequest()
);
const defaultValue1 = getTypeDefaultValue('ListEkmConnectionsRequest', [
'parent',
]);
const defaultValue1 = getTypeDefaultValue(
'.google.cloud.kms.v1.ListEkmConnectionsRequest',
['parent']
);
request.parent = defaultValue1;
const expectedHeaderRequestParams = `parent=${defaultValue1}`;
const expectedError = new Error('expected');
Expand Down
Loading

0 comments on commit f7b6240

Please sign in to comment.