Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore: Remove obsolete special case from tests when verifying "missing index" error message in non-default DB #1973

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions dev/system-test/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/
);
}
);
});
Expand Down Expand Up @@ -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/
);
}
);

Expand Down
Loading