Skip to content

Commit

Permalink
fix: fixes for dynamic routing and streaming descriptors (#142)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

Use gapic-generator-typescript v2.14.5.

PiperOrigin-RevId: 450616838

Source-Link: googleapis/googleapis@7a47b72

Source-Link: googleapis/googleapis-gen@42cc633
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjYzYzMzFiYWUwYjk5ZjYxYjhlMDFhZTE1YjA1MjExNzE2YzRmOSJ9
  • Loading branch information
gcf-owl-bot[bot] authored May 31, 2022
1 parent e051560 commit 5bd7e42
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ export class ServiceManagerClient {
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
service_name: request.serviceName || '',
config_id: request.configId || '',
});
this.initialize();
return this.innerApiCalls.getServiceConfig(request, options, callback);
Expand Down Expand Up @@ -813,6 +814,7 @@ export class ServiceManagerClient {
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
service_name: request.serviceName || '',
rollout_id: request.rolloutId || '',
});
this.initialize();
return this.innerApiCalls.getServiceRollout(request, options, callback);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceConfigRequest()
);
request.serviceName = '';
const expectedHeaderRequestParams = 'service_name=';
request.configId = '';
const expectedHeaderRequestParams = 'service_name=&config_id=';
const expectedOptions = {
otherArgs: {
headers: {
Expand Down Expand Up @@ -410,7 +411,8 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceConfigRequest()
);
request.serviceName = '';
const expectedHeaderRequestParams = 'service_name=';
request.configId = '';
const expectedHeaderRequestParams = 'service_name=&config_id=';
const expectedOptions = {
otherArgs: {
headers: {
Expand Down Expand Up @@ -454,7 +456,8 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceConfigRequest()
);
request.serviceName = '';
const expectedHeaderRequestParams = 'service_name=';
request.configId = '';
const expectedHeaderRequestParams = 'service_name=&config_id=';
const expectedOptions = {
otherArgs: {
headers: {
Expand Down Expand Up @@ -485,6 +488,7 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceConfigRequest()
);
request.serviceName = '';
request.configId = '';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getServiceConfig(request), expectedError);
Expand Down Expand Up @@ -626,7 +630,8 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest()
);
request.serviceName = '';
const expectedHeaderRequestParams = 'service_name=';
request.rolloutId = '';
const expectedHeaderRequestParams = 'service_name=&rollout_id=';
const expectedOptions = {
otherArgs: {
headers: {
Expand Down Expand Up @@ -657,7 +662,8 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest()
);
request.serviceName = '';
const expectedHeaderRequestParams = 'service_name=';
request.rolloutId = '';
const expectedHeaderRequestParams = 'service_name=&rollout_id=';
const expectedOptions = {
otherArgs: {
headers: {
Expand Down Expand Up @@ -704,7 +710,8 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest()
);
request.serviceName = '';
const expectedHeaderRequestParams = 'service_name=';
request.rolloutId = '';
const expectedHeaderRequestParams = 'service_name=&rollout_id=';
const expectedOptions = {
otherArgs: {
headers: {
Expand Down Expand Up @@ -735,6 +742,7 @@ describe('v1.ServiceManagerClient', () => {
new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest()
);
request.serviceName = '';
request.rolloutId = '';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getServiceRollout(request), expectedError);
Expand Down

0 comments on commit 5bd7e42

Please sign in to comment.