@@ -24,7 +24,6 @@ import { FirebaseError } from '@firebase/util';
2424import { expect , use } from 'chai' ;
2525import chaiAsPromised from 'chai-as-promised' ;
2626
27- import { logWarn } from '../../../src/util/log' ;
2827import { addEqualityMatcher } from '../../util/equality_matcher' ;
2928import { Deferred } from '../../util/promise' ;
3029import {
@@ -6573,39 +6572,8 @@ apiDescribe.skipClassic('Pipelines', persistence => {
65736572 . addFields ( reviewsSub . toArrayExpression ( ) . as ( 'reviews' ) )
65746573 . select ( 'title' , 'reviews' ) ;
65756574
6576- // TODO(dlarocque): Remove these target backend conditionals once the 'get_field' rename has rolled out to prod.
6577- const host = firestore . _getSettings ( ) . host ;
6578- const isProd = host === 'firestore.googleapis.com' ;
6579- const isNightly = host === 'test-firestore.sandbox.googleapis.com' ;
6580-
6581- if ( isProd ) {
6582- // The execution of this pipeline is expected to result in a network error
6583- // from the backend until the breaking change to rename the 'field' expression to
6584- // 'get_field' has rolled out to prod.
6585- try {
6586- const results = await execute ( ppl ) ;
6587-
6588- // If this is reached, the execution of the pipeline didn't throw an error, so the
6589- // breaking change must have rolled out to prod. We can assert the newly expected behaviour.
6590- logWarn (
6591- "The 'get_field' expression rename has rolled out to the prod backend. Remove the target backend conditionals in this test."
6592- ) ;
6593- expectResults ( results , { title : '1984' , reviews : [ 'Alice' ] } ) ;
6594- } catch ( err : unknown ) {
6595- const error : Error = err as Error ;
6596- expect ( error . message ) . to . equals (
6597- "The function 'get_field' does not exist, did you mean 'field'?"
6598- ) ;
6599- }
6600- } else if ( isNightly ) {
6601- const results = await execute ( ppl ) ;
6602- expectResults ( results , { title : '1984' , reviews : [ 'Alice' ] } ) ;
6603- } else {
6604- expect ( false ) . to . equal (
6605- true ,
6606- `This test is only expected to run against firestore.googleapis.com or test-firestore.sandbox.googleapis.com, but it instead ran against ${ host } `
6607- ) ;
6608- }
6575+ const results = await execute ( ppl ) ;
6576+ expectResults ( results , { title : '1984' , reviews : [ 'Alice' ] } ) ;
66096577 } ) ;
66106578 } ) ;
66116579
@@ -6687,39 +6655,8 @@ apiDescribe.skipClassic('Pipelines', persistence => {
66876655 . addFields ( reviewsSub . toArrayExpression ( ) . as ( 'reviews' ) )
66886656 . select ( 'title' , 'reviews' ) ;
66896657
6690- // TODO(dlarocque): Remove these target backend conditionals once the 'get_field' rename has rolled out to prod.
6691- const host = firestore . _getSettings ( ) . host ;
6692- const isProd = host === 'firestore.googleapis.com' ;
6693- const isNightly = host === 'test-firestore.sandbox.googleapis.com' ;
6694-
6695- if ( isProd ) {
6696- // The execution of this pipeline is expected to result in a network error
6697- // from the backend until the breaking change to rename the 'field' expression to
6698- // 'get_field' has rolled out to prod.
6699- try {
6700- const results = await execute ( ppl ) ;
6701-
6702- // If this is reached, the execution of the pipeline didn't throw an error, so the
6703- // breaking change must have rolled out to prod. We can assert the newly expected behaviour.
6704- logWarn (
6705- "The 'get_field' expression rename has rolled out to the prod backend. Remove the target backend conditionals in this test."
6706- ) ;
6707- expectResults ( results , { title : '1984' , reviews : [ ] } ) ;
6708- } catch ( err : unknown ) {
6709- const error : Error = err as Error ;
6710- expect ( error . message ) . to . equals (
6711- "The function 'get_field' does not exist, did you mean 'field'?"
6712- ) ;
6713- }
6714- } else if ( isNightly ) {
6715- const results = await execute ( ppl ) ;
6716- expectResults ( results , { title : '1984' , reviews : [ ] } ) ;
6717- } else {
6718- expect ( false ) . to . equal (
6719- true ,
6720- `This test is only expected to run against firestore.googleapis.com or test-firestore.sandbox.googleapis.com, but it instead ran against ${ host } `
6721- ) ;
6722- }
6658+ const results = await execute ( ppl ) ;
6659+ expectResults ( results , { title : '1984' , reviews : [ ] } ) ;
67236660 } ) ;
67246661 } ) ;
67256662
0 commit comments