Skip to content

Commit

Permalink
chore(samples): interactive tutorials code samples for CRUD products (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nmykhailets authored Mar 8, 2022
1 parent 2093cf5 commit 8f0ae3a
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 33 deletions.
3 changes: 0 additions & 3 deletions packages/google-cloud-retail/test/gapic_catalog_service_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ describe('v2.CatalogServiceClient', () => {
);
request.catalog = {};
request.catalog.name = '';
const expectedHeaderRequestParams = 'catalog.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateCatalog(request), expectedError);
Expand Down Expand Up @@ -461,7 +460,6 @@ describe('v2.CatalogServiceClient', () => {
new protos.google.cloud.retail.v2.SetDefaultBranchRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.setDefaultBranch(request), expectedError);
Expand Down Expand Up @@ -588,7 +586,6 @@ describe('v2.CatalogServiceClient', () => {
new protos.google.cloud.retail.v2.GetDefaultBranchRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getDefaultBranch(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ describe('v2alpha.CatalogServiceClient', () => {
);
request.catalog = {};
request.catalog.name = '';
const expectedHeaderRequestParams = 'catalog.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateCatalog(request), expectedError);
Expand Down Expand Up @@ -461,7 +460,6 @@ describe('v2alpha.CatalogServiceClient', () => {
new protos.google.cloud.retail.v2alpha.SetDefaultBranchRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.setDefaultBranch(request), expectedError);
Expand Down Expand Up @@ -588,7 +586,6 @@ describe('v2alpha.CatalogServiceClient', () => {
new protos.google.cloud.retail.v2alpha.GetDefaultBranchRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getDefaultBranch(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ describe('v2beta.CatalogServiceClient', () => {
);
request.catalog = {};
request.catalog.name = '';
const expectedHeaderRequestParams = 'catalog.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateCatalog(request), expectedError);
Expand Down Expand Up @@ -461,7 +460,6 @@ describe('v2beta.CatalogServiceClient', () => {
new protos.google.cloud.retail.v2beta.SetDefaultBranchRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.setDefaultBranch(request), expectedError);
Expand Down Expand Up @@ -588,7 +586,6 @@ describe('v2beta.CatalogServiceClient', () => {
new protos.google.cloud.retail.v2beta.GetDefaultBranchRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getDefaultBranch(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ describe('v2.CompletionServiceClient', () => {
new protos.google.cloud.retail.v2.CompleteQueryRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.completeQuery(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ describe('v2alpha.CompletionServiceClient', () => {
new protos.google.cloud.retail.v2alpha.CompleteQueryRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.completeQuery(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ describe('v2beta.CompletionServiceClient', () => {
new protos.google.cloud.retail.v2beta.CompleteQueryRequest()
);
request.catalog = '';
const expectedHeaderRequestParams = 'catalog=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.completeQuery(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ describe('v2.PredictionServiceClient', () => {
new protos.google.cloud.retail.v2.PredictRequest()
);
request.placement = '';
const expectedHeaderRequestParams = 'placement=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.predict(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ describe('v2alpha.PredictionServiceClient', () => {
new protos.google.cloud.retail.v2alpha.PredictRequest()
);
request.placement = '';
const expectedHeaderRequestParams = 'placement=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.predict(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ describe('v2beta.PredictionServiceClient', () => {
new protos.google.cloud.retail.v2beta.PredictRequest()
);
request.placement = '';
const expectedHeaderRequestParams = 'placement=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.predict(request), expectedError);
Expand Down
4 changes: 0 additions & 4 deletions packages/google-cloud-retail/test/gapic_product_service_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ describe('v2.ProductServiceClient', () => {
new protos.google.cloud.retail.v2.CreateProductRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.createProduct(request), expectedError);
Expand Down Expand Up @@ -489,7 +488,6 @@ describe('v2.ProductServiceClient', () => {
new protos.google.cloud.retail.v2.GetProductRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getProduct(request), expectedError);
Expand Down Expand Up @@ -620,7 +618,6 @@ describe('v2.ProductServiceClient', () => {
);
request.product = {};
request.product.name = '';
const expectedHeaderRequestParams = 'product.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateProduct(request), expectedError);
Expand Down Expand Up @@ -747,7 +744,6 @@ describe('v2.ProductServiceClient', () => {
new protos.google.cloud.retail.v2.DeleteProductRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.deleteProduct(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ describe('v2alpha.ProductServiceClient', () => {
new protos.google.cloud.retail.v2alpha.CreateProductRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.createProduct(request), expectedError);
Expand Down Expand Up @@ -489,7 +488,6 @@ describe('v2alpha.ProductServiceClient', () => {
new protos.google.cloud.retail.v2alpha.GetProductRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getProduct(request), expectedError);
Expand Down Expand Up @@ -620,7 +618,6 @@ describe('v2alpha.ProductServiceClient', () => {
);
request.product = {};
request.product.name = '';
const expectedHeaderRequestParams = 'product.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateProduct(request), expectedError);
Expand Down Expand Up @@ -747,7 +744,6 @@ describe('v2alpha.ProductServiceClient', () => {
new protos.google.cloud.retail.v2alpha.DeleteProductRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.deleteProduct(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ describe('v2beta.ProductServiceClient', () => {
new protos.google.cloud.retail.v2beta.CreateProductRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.createProduct(request), expectedError);
Expand Down Expand Up @@ -489,7 +488,6 @@ describe('v2beta.ProductServiceClient', () => {
new protos.google.cloud.retail.v2beta.GetProductRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getProduct(request), expectedError);
Expand Down Expand Up @@ -620,7 +618,6 @@ describe('v2beta.ProductServiceClient', () => {
);
request.product = {};
request.product.name = '';
const expectedHeaderRequestParams = 'product.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateProduct(request), expectedError);
Expand Down Expand Up @@ -747,7 +744,6 @@ describe('v2beta.ProductServiceClient', () => {
new protos.google.cloud.retail.v2beta.DeleteProductRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.deleteProduct(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ describe('v2.UserEventServiceClient', () => {
new protos.google.cloud.retail.v2.WriteUserEventRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.writeUserEvent(request), expectedError);
Expand Down Expand Up @@ -423,7 +422,6 @@ describe('v2.UserEventServiceClient', () => {
new protos.google.cloud.retail.v2.CollectUserEventRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.collectUserEvent(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ describe('v2alpha.UserEventServiceClient', () => {
new protos.google.cloud.retail.v2alpha.WriteUserEventRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.writeUserEvent(request), expectedError);
Expand Down Expand Up @@ -423,7 +422,6 @@ describe('v2alpha.UserEventServiceClient', () => {
new protos.google.cloud.retail.v2alpha.CollectUserEventRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.collectUserEvent(request), expectedError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ describe('v2beta.UserEventServiceClient', () => {
new protos.google.cloud.retail.v2beta.WriteUserEventRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.writeUserEvent(request), expectedError);
Expand Down Expand Up @@ -423,7 +422,6 @@ describe('v2beta.UserEventServiceClient', () => {
new protos.google.cloud.retail.v2beta.CollectUserEventRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.collectUserEvent(request), expectedError);
Expand Down

0 comments on commit 8f0ae3a

Please sign in to comment.