@@ -159,13 +159,14 @@ pub struct FeatureFlags {
159
159
160
160
impl Default for FeatureFlags {
161
161
fn default ( ) -> Self {
162
- use ic_types:: PrincipalId ;
163
- use std:: str:: FromStr ;
164
- let subnet_id = |id_str : & str | SubnetId :: new ( PrincipalId :: from_str ( id_str) . unwrap ( ) ) ;
162
+ // TODO(MR-649): Comment out for stage 1b -- rollout to specific subnets.
163
+ // use ic_types::PrincipalId;
164
+ // use std::str::FromStr;
165
+ // let subnet_id = |id_str: &str| SubnetId::new(PrincipalId::from_str(id_str).unwrap());
165
166
let enabled_subnets = vec ! [
166
- subnet_id( "eq6en-6jqla-fbu5s-daskr-h6hx2-376n5-iqabl-qgrng-gfqmv-n3yjr-mqe" ) ,
167
- subnet_id( "2fq7c-slacv-26cgz-vzbx2-2jrcs-5edph-i5s2j-tck77-c3rlz-iobzx-mqe" ) ,
168
- subnet_id( "4zbus-z2bmt-ilreg-xakz4-6tyre-hsqj4-slb4g-zjwqo-snjcc-iqphi-3qe" ) ,
167
+ // subnet_id("eq6en-6jqla-fbu5s-daskr-h6hx2-376n5-iqabl-qgrng-gfqmv-n3yjr-mqe"),
168
+ // subnet_id("2fq7c-slacv-26cgz-vzbx2-2jrcs-5edph-i5s2j-tck77-c3rlz-iobzx-mqe"),
169
+ // subnet_id("4zbus-z2bmt-ilreg-xakz4-6tyre-hsqj4-slb4g-zjwqo-snjcc-iqphi-3qe"),
169
170
] ;
170
171
171
172
Self {
@@ -340,38 +341,3 @@ impl Default for Config {
340
341
Self :: new ( )
341
342
}
342
343
}
343
-
344
- #[ cfg( test) ]
345
- mod tests {
346
- use super :: * ;
347
- use ic_types:: PrincipalId ;
348
-
349
- const SUBNET_1 : SubnetId = SubnetId :: new ( PrincipalId :: new ( 1 , [ 1 ; 29 ] ) ) ;
350
- const SUBNET_2 : SubnetId = SubnetId :: new ( PrincipalId :: new ( 1 , [ 2 ; 29 ] ) ) ;
351
-
352
- #[ test]
353
- fn test_best_effort_responses_feature_specific_subnets ( ) {
354
- let best_effort_responses = BestEffortResponsesFeature :: SpecificSubnets ( vec ! [ SUBNET_1 ] ) ;
355
-
356
- assert ! ( best_effort_responses. is_enabled_on( & SUBNET_1 , SubnetType :: Application ) ) ;
357
- assert ! ( best_effort_responses. is_enabled_on( & SUBNET_1 , SubnetType :: System ) ) ;
358
- assert ! ( !best_effort_responses. is_enabled_on( & SUBNET_2 , SubnetType :: Application ) ) ;
359
- assert ! ( !best_effort_responses. is_enabled_on( & SUBNET_2 , SubnetType :: System ) ) ;
360
- }
361
-
362
- #[ test]
363
- fn test_best_effort_responses_feature_application_subnets_only ( ) {
364
- let best_effort_responses = BestEffortResponsesFeature :: ApplicationSubnetsOnly ;
365
-
366
- assert ! ( best_effort_responses. is_enabled_on( & SUBNET_1 , SubnetType :: Application ) ) ;
367
- assert ! ( !best_effort_responses. is_enabled_on( & SUBNET_1 , SubnetType :: System ) ) ;
368
- }
369
-
370
- #[ test]
371
- fn test_best_effort_responses_feature_enabled ( ) {
372
- let best_effort_responses = BestEffortResponsesFeature :: Enabled ;
373
-
374
- assert ! ( best_effort_responses. is_enabled_on( & SUBNET_1 , SubnetType :: Application ) ) ;
375
- assert ! ( best_effort_responses. is_enabled_on( & SUBNET_1 , SubnetType :: System ) ) ;
376
- }
377
- }
0 commit comments