From 50dd56e8b321adc63095abc51ce2595e11e2d115 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Mon, 8 Jan 2024 14:28:21 -0500 Subject: [PATCH] Firestore: Remove obsolete special case from tests when verifying "missing index" error message in non-default DB --- dev/system-test/firestore.ts | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/dev/system-test/firestore.ts b/dev/system-test/firestore.ts index 2b63a2846..c6a7daad7 100644 --- a/dev/system-test/firestore.ts +++ b/dev/system-test/firestore.ts @@ -3194,16 +3194,9 @@ describe('count queries', () => { () => { const query = randomCol.where('key1', '==', 42).where('key2', '<', 42); const countQuery = query.count(); - const databaseId = query.firestore._settings.databaseId ?? '(default)'; - // TODO(b/316359394) Remove this check for the default databases once - // cl/582465034 is rolled out to production. - if (databaseId === '(default)') { - return expect(countQuery.get()).to.be.eventually.rejectedWith( - /index.*https:\/\/console\.firebase\.google\.com/ - ); - } else { - return expect(countQuery.get()).to.be.eventually.rejectedWith(/index/); - } + return expect(countQuery.get()).to.be.eventually.rejectedWith( + /index.*https:\/\/console\.firebase\.google\.com/ + ); } ); }); @@ -3571,18 +3564,9 @@ describe('Aggregation queries', () => { sum: AggregateField.sum('pages'), average: AggregateField.average('pages'), }); - const databaseId = query.firestore._settings.databaseId ?? '(default)'; - // TODO(b/316359394) Remove this check for the default databases once - // cl/582465034 is rolled out to production. - if (databaseId === '(default)') { - return expect(aggregateQuery.get()).to.be.eventually.rejectedWith( - /index.*https:\/\/console\.firebase\.google\.com/ - ); - } else { - return expect(aggregateQuery.get()).to.be.eventually.rejectedWith( - /index/ - ); - } + return expect(aggregateQuery.get()).to.be.eventually.rejectedWith( + /index.*https:\/\/console\.firebase\.google\.com/ + ); } );