From 9fe979d2d6d02e974e2b5aaeef6ec885877eea31 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Fri, 21 Apr 2023 14:13:19 +0200 Subject: [PATCH] tests: adopt bootspec v1 format --- nix/tests/lanzaboote.nix | 2 +- rust/tool/tests/common/mod.rs | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/nix/tests/lanzaboote.nix b/nix/tests/lanzaboote.nix index eca724d..94b5afb 100644 --- a/nix/tests/lanzaboote.nix +++ b/nix/tests/lanzaboote.nix @@ -54,7 +54,7 @@ let return f'/boot/EFI/nixos/{store_dir}-{filename}.efi' 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!" src_path = ${path.src} dst_path = ${path.dst} diff --git a/rust/tool/tests/common/mod.rs b/rust/tool/tests/common/mod.rs index 7980d8e..e650a79 100644 --- a/rust/tool/tests/common/mod.rs +++ b/rust/tool/tests/common/mod.rs @@ -39,7 +39,7 @@ pub fn setup_generation_link_from_toplevel( version: u64, ) -> Result { let bootspec = json!({ - "v1": { + "org.nixos.bootspec.v1": { "init": format!("init-v{}", version), "initrd": toplevel.join("initrd"), "kernel": toplevel.join("kernel"), @@ -56,11 +56,8 @@ pub fn setup_generation_link_from_toplevel( "label": "LanzaOS", "toplevel": toplevel, "system": "x86_64-linux", - "specialisation": {}, - "extensions": { - "lanzaboote": { "osRelease": toplevel.join("os-release") } - } - } + }, + "org.nixos-community.lanzaboote": { "osRelease": toplevel.join("os-release") } }); let generation_link_path = profiles_directory.join(format!("system-{}-link", version));