@@ -20,7 +20,7 @@ import { SettingsService } from './settings_service';
20
20
import { CONFIG_EXPIRY_LOCAL_STORAGE_KEY } from '../constants' ;
21
21
import { setupApi , Api } from './api_service' ;
22
22
import * as iidService from './iid_service' ;
23
- import { getConfig , isDestTransport } from './remote_config_service' ;
23
+ import { getConfig , isDestFl } from './remote_config_service' ;
24
24
import { FirebaseApp } from '@firebase/app-types' ;
25
25
import '../../test/setup' ;
26
26
@@ -135,7 +135,7 @@ describe('Performance Monitoring > remote_config_service', () => {
135
135
TRANSPORT_KEY
136
136
) ;
137
137
expect ( SettingsService . getInstance ( ) . logSource ) . to . equal ( LOG_SOURCE ) ;
138
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . true ;
138
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . true ;
139
139
expect (
140
140
SettingsService . getInstance ( ) . networkRequestsSamplingRate
141
141
) . to . equal ( NETWORK_SAMPLIG_RATE ) ;
@@ -176,7 +176,7 @@ describe('Performance Monitoring > remote_config_service', () => {
176
176
TRANSPORT_KEY
177
177
) ;
178
178
expect ( SettingsService . getInstance ( ) . logSource ) . to . equal ( LOG_SOURCE ) ;
179
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . true ;
179
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . true ;
180
180
expect (
181
181
SettingsService . getInstance ( ) . networkRequestsSamplingRate
182
182
) . to . equal ( NETWORK_SAMPLIG_RATE ) ;
@@ -252,7 +252,7 @@ describe('Performance Monitoring > remote_config_service', () => {
252
252
await getConfig ( IID ) ;
253
253
254
254
// If no template, will send to cc.
255
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . false ;
255
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . false ;
256
256
} ) ;
257
257
258
258
it ( 'marks event destination to cc if instance state unspecified' , async ( ) => {
@@ -270,7 +270,7 @@ describe('Performance Monitoring > remote_config_service', () => {
270
270
await getConfig ( IID ) ;
271
271
272
272
// If instance state unspecified, will send to cc.
273
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . false ;
273
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . false ;
274
274
} ) ;
275
275
276
276
it ( "marks event destination to cc if state doesn't exist" , async ( ) => {
@@ -285,10 +285,10 @@ describe('Performance Monitoring > remote_config_service', () => {
285
285
await getConfig ( IID ) ;
286
286
287
287
// If "state" doesn't exist, will send to cc.
288
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . false ;
288
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . false ;
289
289
} ) ;
290
290
291
- it ( 'marks event destination to transport if template exists but no rollout flag' , async ( ) => {
291
+ it ( 'marks event destination to Fl if template exists but no rollout flag' , async ( ) => {
292
292
const CONFIG_WITHOUT_ROLLOUT_FLAG = `{"entries":{"fpr_enabled":"true",\
293
293
"fpr_log_endpoint_url":"https://firebaselogging.test.com",\
294
294
"fpr_log_source":"2","fpr_vc_network_request_sampling_rate":"0.250000",\
@@ -304,8 +304,8 @@ describe('Performance Monitoring > remote_config_service', () => {
304
304
) ;
305
305
await getConfig ( IID ) ;
306
306
307
- // If template exists but no rollout flag, will send to transport .
308
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . true ;
307
+ // If template exists but no rollout flag, will send to Fl .
308
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . true ;
309
309
} ) ;
310
310
311
311
it ( 'marks event destination to cc when instance is outside of rollout range' , async ( ) => {
@@ -326,10 +326,10 @@ describe('Performance Monitoring > remote_config_service', () => {
326
326
await getConfig ( IID ) ;
327
327
328
328
// If rollout flag exists, will send to cc when this instance is out of rollout scope.
329
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . false ;
329
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . false ;
330
330
} ) ;
331
331
332
- it ( 'marks event destination to transport when instance is within rollout range' , async ( ) => {
332
+ it ( 'marks event destination to Fl when instance is within rollout range' , async ( ) => {
333
333
const CONFIG_WITH_ROLLOUT_FLAG_40 = `{"entries":{"fpr_enabled":"true",\
334
334
"fpr_log_endpoint_url":"https://firebaselogging.test.com",\
335
335
"fpr_log_source":"2","fpr_vc_network_request_sampling_rate":"0.250000",\
@@ -346,25 +346,25 @@ describe('Performance Monitoring > remote_config_service', () => {
346
346
) ;
347
347
await getConfig ( IID ) ;
348
348
349
- // If rollout flag exists, will send to transport when this instance is within rollout scope.
350
- expect ( SettingsService . getInstance ( ) . shouldSendToTransport ) . to . be . true ;
349
+ // If rollout flag exists, will send to Fl when this instance is within rollout scope.
350
+ expect ( SettingsService . getInstance ( ) . shouldSendToFl ) . to . be . true ;
351
351
} ) ;
352
352
} ) ;
353
353
354
- describe ( 'isDestTransport ' , ( ) => {
354
+ describe ( 'isDestFl ' , ( ) => {
355
355
it ( 'marks traffic to cc when rollout percentage is 0' , ( ) => {
356
- const shouldSendToTransport = isDestTransport ( 'abc' , 0 ) ; // Hash percentage of "abc" is 38%.
357
- expect ( shouldSendToTransport ) . to . be . false ;
356
+ const shouldSendToFl = isDestFl ( 'abc' , 0 ) ; // Hash percentage of "abc" is 38%.
357
+ expect ( shouldSendToFl ) . to . be . false ;
358
358
} ) ;
359
359
360
- it ( 'marks traffic to transport when rollout percentage is 100' , ( ) => {
361
- const shouldSendToTransport = isDestTransport ( 'abc' , 100 ) ; // Hash percentage of "abc" is 38%.
362
- expect ( shouldSendToTransport ) . to . be . true ;
360
+ it ( 'marks traffic to Fl when rollout percentage is 100' , ( ) => {
361
+ const shouldSendToFl = isDestFl ( 'abc' , 100 ) ; // Hash percentage of "abc" is 38%.
362
+ expect ( shouldSendToFl ) . to . be . true ;
363
363
} ) ;
364
364
365
- it ( 'marks traffic to transport if hash percentage is lower than rollout percentage 50%' , ( ) => {
366
- const shouldSendToTransport = isDestTransport ( 'abc' , 50 ) ; // Hash percentage of "abc" is 38%.
367
- expect ( shouldSendToTransport ) . to . be . true ;
365
+ it ( 'marks traffic to Fl if hash percentage is lower than rollout percentage 50%' , ( ) => {
366
+ const shouldSendToFl = isDestFl ( 'abc' , 50 ) ; // Hash percentage of "abc" is 38%.
367
+ expect ( shouldSendToFl ) . to . be . true ;
368
368
} ) ;
369
369
} ) ;
370
370
} ) ;
0 commit comments