diff options
Diffstat (limited to 'tests/model_validation.rs')
| -rw-r--r-- | tests/model_validation.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/model_validation.rs b/tests/model_validation.rs index 5134a6f..f94a656 100644 --- a/tests/model_validation.rs +++ b/tests/model_validation.rs @@ -42,6 +42,27 @@ fn parses_a_typed_image_spec() { } #[test] +fn controller_spec_preserves_the_vendored_controller_package_set() { + let spec = ImageSpec::load(std::path::Path::new("profiles/alt-controller.toml")) + .expect("controller spec parses"); + + assert_eq!(spec.packages.base.len(), 96); + for package in [ + "make-initrd-multipath", + "firmware-intel-ucode", + "openssh-server-control", + "systemd-analyze", + "libiec61850", + "rsyslog", + ] { + assert!( + spec.packages.base.iter().any(|candidate| candidate == package), + "controller package set must contain {package}" + ); + } +} + +#[test] fn compiles_a_validated_spec_into_an_immutable_build_plan() { let spec = load(VALID_SPEC).expect("valid spec"); let plan = BuildPlan::compile(spec).expect("plan compiles"); |