Skip to content

Commit

Permalink
Merge branch 'main' into mrschmidt/restclient
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Mar 16, 2022
2 parents 92f282d + b5d7d5a commit e7fbac8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
5 changes: 0 additions & 5 deletions dev/test/gapic_firestore_admin_v1.ts
Expand Up @@ -357,7 +357,6 @@ describe('v1.FirestoreAdminClient', () => {
new protos.google.firestore.admin.v1.GetIndexRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getIndex(request), expectedError);
Expand Down Expand Up @@ -484,7 +483,6 @@ describe('v1.FirestoreAdminClient', () => {
new protos.google.firestore.admin.v1.DeleteIndexRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.deleteIndex(request), expectedError);
Expand Down Expand Up @@ -608,7 +606,6 @@ describe('v1.FirestoreAdminClient', () => {
new protos.google.firestore.admin.v1.GetFieldRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getField(request), expectedError);
Expand Down Expand Up @@ -735,7 +732,6 @@ describe('v1.FirestoreAdminClient', () => {
new protos.google.firestore.admin.v1.GetDatabaseRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getDatabase(request), expectedError);
Expand Down Expand Up @@ -862,7 +858,6 @@ describe('v1.FirestoreAdminClient', () => {
new protos.google.firestore.admin.v1.ListDatabasesRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.listDatabases(request), expectedError);
Expand Down
10 changes: 2 additions & 8 deletions dev/test/gapic_firestore_v1.ts
Expand Up @@ -363,7 +363,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.GetDocumentRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getDocument(request), expectedError);
Expand Down Expand Up @@ -494,7 +493,6 @@ describe('v1.FirestoreClient', () => {
);
request.document = {};
request.document.name = '';
const expectedHeaderRequestParams = 'document.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateDocument(request), expectedError);
Expand Down Expand Up @@ -621,7 +619,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.DeleteDocumentRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.deleteDocument(request), expectedError);
Expand Down Expand Up @@ -748,7 +745,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.BeginTransactionRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.beginTransaction(request), expectedError);
Expand Down Expand Up @@ -872,7 +868,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.CommitRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.commit(request), expectedError);
Expand Down Expand Up @@ -996,7 +991,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.RollbackRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.rollback(request), expectedError);
Expand Down Expand Up @@ -1123,7 +1117,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.BatchWriteRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.batchWrite(request), expectedError);
Expand Down Expand Up @@ -1250,7 +1243,6 @@ describe('v1.FirestoreClient', () => {
new protos.google.firestore.v1.CreateDocumentRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.createDocument(request), expectedError);
Expand Down Expand Up @@ -1354,6 +1346,7 @@ describe('v1.FirestoreClient', () => {
const request = generateSampleMessage(
new protos.google.firestore.v1.BatchGetDocumentsRequest()
);
request.database = '';
const expectedError = new Error('The client has already been closed.');
client.close();
const stream = client.batchGetDocuments(request);
Expand Down Expand Up @@ -1468,6 +1461,7 @@ describe('v1.FirestoreClient', () => {
const request = generateSampleMessage(
new protos.google.firestore.v1.RunQueryRequest()
);
request.parent = '';
const expectedError = new Error('The client has already been closed.');
client.close();
const stream = client.runQuery(request);
Expand Down
10 changes: 2 additions & 8 deletions dev/test/gapic_firestore_v1beta1.ts
Expand Up @@ -363,7 +363,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.GetDocumentRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.getDocument(request), expectedError);
Expand Down Expand Up @@ -494,7 +493,6 @@ describe('v1beta1.FirestoreClient', () => {
);
request.document = {};
request.document.name = '';
const expectedHeaderRequestParams = 'document.name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.updateDocument(request), expectedError);
Expand Down Expand Up @@ -621,7 +619,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.DeleteDocumentRequest()
);
request.name = '';
const expectedHeaderRequestParams = 'name=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.deleteDocument(request), expectedError);
Expand Down Expand Up @@ -748,7 +745,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.BeginTransactionRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.beginTransaction(request), expectedError);
Expand Down Expand Up @@ -872,7 +868,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.CommitRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.commit(request), expectedError);
Expand Down Expand Up @@ -996,7 +991,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.RollbackRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.rollback(request), expectedError);
Expand Down Expand Up @@ -1123,7 +1117,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.BatchWriteRequest()
);
request.database = '';
const expectedHeaderRequestParams = 'database=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.batchWrite(request), expectedError);
Expand Down Expand Up @@ -1250,7 +1243,6 @@ describe('v1beta1.FirestoreClient', () => {
new protos.google.firestore.v1beta1.CreateDocumentRequest()
);
request.parent = '';
const expectedHeaderRequestParams = 'parent=';
const expectedError = new Error('The client has already been closed.');
client.close();
await assert.rejects(client.createDocument(request), expectedError);
Expand Down Expand Up @@ -1358,6 +1350,7 @@ describe('v1beta1.FirestoreClient', () => {
const request = generateSampleMessage(
new protos.google.firestore.v1beta1.BatchGetDocumentsRequest()
);
request.database = '';
const expectedError = new Error('The client has already been closed.');
client.close();
const stream = client.batchGetDocuments(request);
Expand Down Expand Up @@ -1474,6 +1467,7 @@ describe('v1beta1.FirestoreClient', () => {
const request = generateSampleMessage(
new protos.google.firestore.v1beta1.RunQueryRequest()
);
request.parent = '';
const expectedError = new Error('The client has already been closed.');
client.close();
const stream = client.runQuery(request);
Expand Down

0 comments on commit e7fbac8

Please sign in to comment.