tests: adopt bootspec v1 format

This commit is contained in:
Raito Bezarius 2023-04-21 14:13:19 +02:00
parent 48ff4cb7c4
commit 9fe979d2d6
2 changed files with 4 additions and 7 deletions

View File

@ -54,7 +54,7 @@ let
return f'/boot/EFI/nixos/{store_dir}-{filename}.efi' return f'/boot/EFI/nixos/{store_dir}-{filename}.efi'
machine.start() machine.start()
bootspec = json.loads(machine.succeed("cat /run/current-system/boot.json")).get('v1') bootspec = json.loads(machine.succeed("cat /run/current-system/boot.json")).get('org.nixos.bootspec.v1')
assert bootspec is not None, "Unsupported bootspec version!" assert bootspec is not None, "Unsupported bootspec version!"
src_path = ${path.src} src_path = ${path.src}
dst_path = ${path.dst} dst_path = ${path.dst}

View File

@ -39,7 +39,7 @@ pub fn setup_generation_link_from_toplevel(
version: u64, version: u64,
) -> Result<PathBuf> { ) -> Result<PathBuf> {
let bootspec = json!({ let bootspec = json!({
"v1": { "org.nixos.bootspec.v1": {
"init": format!("init-v{}", version), "init": format!("init-v{}", version),
"initrd": toplevel.join("initrd"), "initrd": toplevel.join("initrd"),
"kernel": toplevel.join("kernel"), "kernel": toplevel.join("kernel"),
@ -56,11 +56,8 @@ pub fn setup_generation_link_from_toplevel(
"label": "LanzaOS", "label": "LanzaOS",
"toplevel": toplevel, "toplevel": toplevel,
"system": "x86_64-linux", "system": "x86_64-linux",
"specialisation": {}, },
"extensions": { "org.nixos-community.lanzaboote": { "osRelease": toplevel.join("os-release") }
"lanzaboote": { "osRelease": toplevel.join("os-release") }
}
}
}); });
let generation_link_path = profiles_directory.join(format!("system-{}-link", version)); let generation_link_path = profiles_directory.join(format!("system-{}-link", version));