@@ -158,18 +158,15 @@ mod tests {
158158
159159 // With no flags loaded yet, get should return defaults.
160160 let initial = client. flags ( ) . get ( ) . await ;
161- assert ! ( !initial. enable_cipher_key_encryption) ;
162161 assert ! ( !initial. strict_cipher_decryption) ;
163162
164163 // Loading flags should persist them via the FLAGS setting.
165164 let mut map = HashMap :: new ( ) ;
166- map. insert ( "enableCipherKeyEncryption" . to_string ( ) , true ) ;
167165 map. insert ( "pm-34500-strict-cipher-decryption" . to_string ( ) , true ) ;
168166 client. flags ( ) . load ( map) . await ;
169167
170168 // get should now return the loaded values.
171169 let loaded = client. flags ( ) . get ( ) . await ;
172- assert ! ( loaded. enable_cipher_key_encryption) ;
173170 assert ! ( loaded. strict_cipher_decryption) ;
174171
175172 // The values should be readable directly from the setting too.
@@ -182,7 +179,6 @@ mod tests {
182179 . await
183180 . unwrap ( )
184181 . expect ( "flags should be persisted after load" ) ;
185- assert ! ( persisted. enable_cipher_key_encryption) ;
186182 assert ! ( persisted. strict_cipher_decryption) ;
187183 }
188184
@@ -192,7 +188,7 @@ mod tests {
192188 Mock :: given ( method ( "GET" ) )
193189 . and ( path ( "/config" ) )
194190 . respond_with ( ResponseTemplate :: new ( 200 ) . set_body_json ( json ! ( {
195- "featureStates" : { "enableCipherKeyEncryption " : true }
191+ "featureStates" : { "pm-34500-strict-cipher-decryption " : true }
196192 } ) ) )
197193 . expect ( 1 )
198194 . mount ( & server)
@@ -202,7 +198,7 @@ mod tests {
202198 let before = Utc :: now ( ) ;
203199 client. flags ( ) . fetch ( true ) . await . unwrap ( ) ;
204200
205- assert ! ( client. flags( ) . get( ) . await . enable_cipher_key_encryption ) ;
201+ assert ! ( client. flags( ) . get( ) . await . strict_cipher_decryption ) ;
206202 let fetched_at = read_fetched_at ( & client)
207203 . await
208204 . expect ( "fetched_at must be set after a successful fetch" ) ;
@@ -247,7 +243,7 @@ mod tests {
247243 Mock :: given ( method ( "GET" ) )
248244 . and ( path ( "/config" ) )
249245 . respond_with ( ResponseTemplate :: new ( 200 ) . set_body_json ( json ! ( {
250- "featureStates" : { "enableCipherKeyEncryption " : true }
246+ "featureStates" : { "pm-34500-strict-cipher-decryption " : true }
251247 } ) ) )
252248 . expect ( 1 )
253249 . mount ( & server)
@@ -259,7 +255,7 @@ mod tests {
259255
260256 client. flags ( ) . fetch ( false ) . await . unwrap ( ) ;
261257
262- assert ! ( client. flags( ) . get( ) . await . enable_cipher_key_encryption ) ;
258+ assert ! ( client. flags( ) . get( ) . await . strict_cipher_decryption ) ;
263259 let fetched_at = read_fetched_at ( & client) . await . unwrap ( ) ;
264260 assert ! ( fetched_at > stale) ;
265261 }
@@ -277,14 +273,14 @@ mod tests {
277273 client
278274 . flags ( )
279275 . load ( HashMap :: from ( [ (
280- "enableCipherKeyEncryption " . to_string ( ) ,
276+ "pm-34500-strict-cipher-decryption " . to_string ( ) ,
281277 true ,
282278 ) ] ) )
283279 . await ;
284280
285281 assert ! ( client. flags( ) . fetch( true ) . await . is_err( ) ) ;
286282 assert ! (
287- client. flags( ) . get( ) . await . enable_cipher_key_encryption ,
283+ client. flags( ) . get( ) . await . strict_cipher_decryption ,
288284 "previously persisted flags must survive a failed fetch"
289285 ) ;
290286 }
0 commit comments