commit 15d8850412224d48073d20e09ae26bd96efeb4a4 parent 6011cc55c88a91f6303c546d54bddc3d95c4e56b Author: triesap <tyson@radroots.org> Date: Sun, 16 Aug 2026 05:59:48 +0000 runtime-manager: cover bootstrap accessors Diffstat:
| M | crates/runtime_manager/src/model.rs | | | 24 | ++++++++++++++++++++++++ |
1 file changed, 24 insertions(+), 0 deletions(-)
diff --git a/crates/runtime_manager/src/model.rs b/crates/runtime_manager/src/model.rs @@ -123,3 +123,27 @@ impl BootstrapRuntimeContract { self.preferred_cli_binding } } + +#[cfg(test)] +mod tests { + use super::BootstrapRuntimeContract; + + #[test] + fn bootstrap_accessors_project_parsed_fields_without_selecting_a_default() { + let contract = toml::from_str::<BootstrapRuntimeContract>( + r#" +service_id = "myc" +default_instance_id = "explicit-test-instance" +preferred_cli_binding = false +"#, + ) + .expect("bootstrap contract"); + + assert_eq!(contract.service_id().as_str(), "myc"); + assert_eq!( + contract.default_instance_id().as_str(), + "explicit-test-instance" + ); + assert!(!contract.preferred_cli_binding()); + } +}