From 0d5aaab9d1b42351ea5e96779b0253f8634dab9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 24 Aug 2024 11:32:40 +0200 Subject: [PATCH] use compliant machine name in installation test --- checks/flash/flake-module.nix | 10 +++++----- checks/installation/flake-module.nix | 15 ++++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/checks/flash/flake-module.nix b/checks/flash/flake-module.nix index 5d8a5ae2b..7887005cb 100644 --- a/checks/flash/flake-module.nix +++ b/checks/flash/flake-module.nix @@ -10,10 +10,10 @@ let dependencies = [ pkgs.disko - self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.toplevel - self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.diskoScript - self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.diskoScript.drvPath - self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.clan.deployment.file + self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine.config.system.build.toplevel + self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine.config.system.build.diskoScript + self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine.config.system.build.diskoScript.drvPath + self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine.config.system.clan.deployment.file ] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs); closureInfo = pkgs.closureInfo { rootPaths = dependencies; }; in @@ -42,7 +42,7 @@ testScript = '' start_all() - machine.succeed("clan flash --debug --flake ${../..} --yes --disk main /dev/vdb test_install_machine") + machine.succeed("clan flash --debug --flake ${../..} --yes --disk main /dev/vdb test-install-machine") ''; } { inherit pkgs self; }; }; diff --git a/checks/installation/flake-module.nix b/checks/installation/flake-module.nix index ac8ddf847..9cd096bfe 100644 --- a/checks/installation/flake-module.nix +++ b/checks/installation/flake-module.nix @@ -1,14 +1,14 @@ { self, lib, ... }: { - clan.machines.test_install_machine = { - clan.core.networking.targetHost = "test_install_machine"; + clan.machines.test-install-machine = { + clan.core.networking.targetHost = "test-install-machine"; fileSystems."/".device = lib.mkDefault "/dev/vdb"; boot.loader.grub.device = lib.mkDefault "/dev/vdb"; - imports = [ self.nixosModules.test_install_machine ]; + imports = [ self.nixosModules.test-install-machine ]; }; flake.nixosModules = { - test_install_machine = + test-install-machine = { lib, modulesPath, ... }: { imports = [ @@ -34,9 +34,9 @@ let dependencies = [ self - self.nixosConfigurations.test_install_machine.config.system.build.toplevel - self.nixosConfigurations.test_install_machine.config.system.build.diskoScript - self.nixosConfigurations.test_install_machine.config.system.clan.deployment.file + self.nixosConfigurations.test-install-machine.config.system.build.toplevel + self.nixosConfigurations.test-install-machine.config.system.build.diskoScript + self.nixosConfigurations.test-install-machine.config.system.clan.deployment.file pkgs.stdenv.drvPath pkgs.nixos-anywhere ] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs); @@ -99,6 +99,7 @@ client.wait_until_succeeds("ssh -o StrictHostKeyChecking=accept-new -v root@target hostname") client.succeed("clan machines install --debug --flake ${../..} --yes test_install_machine root@target >&2") + client.succeed("clan machines install --debug --flake ${../..} --yes test-install-machine root@target >&2") try: target.shutdown() except BrokenPipeError: