diff --git a/.idea/runConfigurations/System_Test.xml b/.idea/runConfigurations/System_Test.xml
index 9dad0feea..6be057102 100644
--- a/.idea/runConfigurations/System_Test.xml
+++ b/.idea/runConfigurations/System_Test.xml
@@ -7,6 +7,9 @@
true
+
+
+
bdd
--require ts-node/register/type-check --no-cache --timeout 60000
diff --git a/dev/system-test/firestore.ts b/dev/system-test/firestore.ts
index 2ceca9626..eda7e3316 100644
--- a/dev/system-test/firestore.ts
+++ b/dev/system-test/firestore.ts
@@ -3447,7 +3447,7 @@ describe.skipEnterprise('Query class - Standard DB', () => {
// TODO Enterprise - wait for implicit sort order decision
// Skip this test if running against standard production because it results in a 'missing index' error.
- it.skipClassic('supports OR queries with composite indexes', async () => {
+ it.skipStandard('supports OR queries with composite indexes', async () => {
const collection = await testCollectionWithDocs({
doc1: {a: 1, b: 0},
doc2: {a: 2, b: 1},
@@ -3547,7 +3547,7 @@ describe.skipEnterprise('Query class - Standard DB', () => {
// Skip this test if running against production standard DB because it results in a 'missing index' error.
// The Firestore Emulator and Enterprise-editions, however, do serve these queries.
- it.skipClassic(
+ it.skipStandard(
'supports OR queries on documents with missing fields',
async () => {
const collection = await testCollectionWithDocs({
@@ -3645,7 +3645,7 @@ describe.skipEnterprise('Query class - Standard DB', () => {
});
// Skip this test if running against production because it results in a 'missing index' error.
- it.skipClassic('supports OR queries with not-in', async () => {
+ it.skipStandard('supports OR queries with not-in', async () => {
const collection = await testCollectionWithDocs({
doc1: {a: 1, b: 0},
doc2: {b: 1},
@@ -7503,7 +7503,7 @@ describe('Client initialization', () => {
'CollectionReference.listDocuments()',
randomColl => {
- if (process.env.RUN_ENTERPRISE_TESTS) return Promise.resolve();
+ if (isEnterprise()) return Promise.resolve();
return randomColl.listDocuments();
},
],
@@ -7563,7 +7563,7 @@ describe('Client initialization', () => {
'CollectionGroup.getPartitions()',
async randomColl => {
// Requires PartitionQuery support
- if (process.env.RUN_ENTERPRISE_TESTS) return;
+ if (isEnterprise()) return;
const partitions = randomColl.firestore
.collectionGroup('id')
diff --git a/dev/system-test/pipeline.ts b/dev/system-test/pipeline.ts
index d2a565d83..79553abcf 100644
--- a/dev/system-test/pipeline.ts
+++ b/dev/system-test/pipeline.ts
@@ -136,7 +136,7 @@ import * as chaiAsPromised from 'chai-as-promised';
import {afterEach, describe, it} from 'mocha';
import '../test/util/mocha_extensions';
-import {verifyInstance} from '../test/util/helpers';
+import {isPreferRest, verifyInstance} from '../test/util/helpers';
import {getTestDb, getTestRoot} from './firestore';
import {Firestore as InternalFirestore} from '../src';
@@ -146,7 +146,7 @@ use(chaiAsPromised);
const timestampDeltaMS = 3000;
-describe.skipClassic('Pipeline class', () => {
+describe.skipStandard('Pipeline class', () => {
let firestore: Firestore;
let randomCol: CollectionReference;
let beginDocCreation = 0;
@@ -458,7 +458,7 @@ describe.skipClassic('Pipeline class', () => {
});
describe('pipeline explain', () => {
- it('mode: analyze, format: text', async () => {
+ it.skipRestConnection('mode: analyze, format: text', async () => {
const ppl = firestore
.pipeline()
.collection(randomCol.path)
@@ -498,7 +498,7 @@ describe.skipClassic('Pipeline class', () => {
);
});
- it('mode: analyze, format: unspecified', async () => {
+ it.skipRestConnection('mode: analyze, format: unspecified', async () => {
const ppl = firestore
.pipeline()
.collection(randomCol.path)
@@ -1636,17 +1636,24 @@ describe.skipClassic('Pipeline class', () => {
expect.fail('expected pipeline.execute() to throw');
} catch (e: unknown) {
- expect(e instanceof Error).to.be.true;
- const err = e as ServiceError;
- expect(err['code']).to.equal(3);
- expect(typeof err['message']).to.equal('string');
- expect(typeof err['details']).to.equal('string');
- expect(typeof err['stack']).to.equal('string');
- expect(err['metadata'] instanceof Object).to.be.true;
-
- expect(err['message']).to.equal(
- `${err.code} INVALID_ARGUMENT: ${err.details}`,
- );
+ if (isPreferRest()) {
+ expect(e instanceof Error).to.be.true;
+ const err = e as ServiceError;
+ expect(err['code']).to.equal(400);
+ } else {
+ // grpc
+ expect(e instanceof Error).to.be.true;
+ const err = e as ServiceError;
+ expect(err['code']).to.equal(3);
+ expect(typeof err['message']).to.equal('string');
+ expect(typeof err['details']).to.equal('string');
+ expect(typeof err['stack']).to.equal('string');
+ expect(err['metadata'] instanceof Object).to.be.true;
+
+ expect(err['message']).to.equal(
+ `${err.code} INVALID_ARGUMENT: ${err.details}`,
+ );
+ }
}
});
@@ -1667,32 +1674,39 @@ describe.skipClassic('Pipeline class', () => {
expect.fail('expected pipeline.execute() to throw');
} catch (e: unknown) {
- const err = e as {[k: string]: unknown};
- expect(err instanceof Error).to.be.true;
-
- expect(err['code']).to.equal(8);
- expect(typeof err['message']).to.equal('string');
- expect(typeof err['details']).to.equal('string');
- expect(typeof err['stack']).to.equal('string');
- expect(err['metadata'] instanceof Object).to.be.true;
-
- expect(err['message']).to.equal(
- `${err.code} RESOURCE_EXHAUSTED: ${err.details}`,
- );
+ if (isPreferRest()) {
+ const err = e as {[k: string]: unknown};
+ expect(err instanceof Error).to.be.true;
+ expect(err['code']).to.equal(429);
+ } else {
+ // grpc
+ const err = e as {[k: string]: unknown};
+ expect(err instanceof Error).to.be.true;
+
+ expect(err['code']).to.equal(8);
+ expect(typeof err['message']).to.equal('string');
+ expect(typeof err['details']).to.equal('string');
+ expect(typeof err['stack']).to.equal('string');
+ expect(err['metadata'] instanceof Object).to.be.true;
+
+ expect(err['message']).to.equal(
+ `${err.code} RESOURCE_EXHAUSTED: ${err.details}`,
+ );
- expect('statusDetails' in err).to.be.true;
- expect(Array.isArray(err['statusDetails'])).to.be.true;
+ expect('statusDetails' in err).to.be.true;
+ expect(Array.isArray(err['statusDetails'])).to.be.true;
- const statusDetails = err['statusDetails'] as Array