@@ -147,16 +147,10 @@ fn inject_generated_config_stores(template: &str, envelope_json: &str) -> Result
147147fn generated_config_store_blocks ( envelope_json : & str ) -> String {
148148 format ! (
149149 r#" # Generated by generate-viceroy-config. Do not edit generated output.
150- [local_server.config_stores.app_config]
151- format = "inline-toml"
152- [local_server.config_stores.app_config.contents]
153- app_config = '''{envelope_json}'''
154-
155- # The post-cutover entry point still opens this store, but no longer
156- # reads rollout flags from it.
157150 [local_server.config_stores.trusted_server_config]
158151 format = "inline-toml"
159- [local_server.config_stores.trusted_server_config.contents]"#
152+ [local_server.config_stores.trusted_server_config.contents]
153+ trusted_server_config = '''{envelope_json}'''"#
160154 )
161155}
162156
@@ -222,7 +216,7 @@ mod tests {
222216 . expect ( "should inject generated stores" ) ;
223217
224218 assert ! (
225- generated. contains( "[local_server.config_stores.app_config ]" ) ,
219+ generated. contains( "[local_server.config_stores.trusted_server_config ]" ) ,
226220 "should include app config store"
227221 ) ;
228222 assert ! (
@@ -246,11 +240,12 @@ mod tests {
246240 . expect ( "should inject generated stores" ) ;
247241 let parsed: toml:: Value = toml:: from_str ( & generated) . expect ( "should parse as TOML" ) ;
248242
249- assert ! (
243+ assert_eq ! (
250244 parsed[ "local_server" ] [ "config_stores" ] [ "trusted_server_config" ] [ "contents" ]
251- . as_table( )
252- . is_some_and( toml:: Table :: is_empty) ,
253- "trusted_server_config should remain present with no rollout flags"
245+ [ "trusted_server_config" ]
246+ . as_str( ) ,
247+ Some ( envelope. as_str( ) ) ,
248+ "trusted_server_config should contain the app-config blob"
254249 ) ;
255250 }
256251
0 commit comments