nixosTests: handleTest -> runTest, batch 1

Reference: https://github.com/NixOS/nixpkgs/issues/386873
This commit is contained in:
Sizhe Zhao
2025-05-24 23:40:23 +08:00
parent 131462b962
commit f34483be5e
538 changed files with 35525 additions and 36600 deletions

View File

@@ -1,22 +1,20 @@
import ./make-test-python.nix (
{ pkgs, ... }:
{
name = "nix-config";
nodes.machine =
{ pkgs, ... }:
{
nix.settings = {
nix-path = [ "nonextra=/etc/value.nix" ];
extra-nix-path = [ "extra=/etc/value.nix" ];
};
environment.etc."value.nix".text = "42";
{ pkgs, ... }:
{
name = "nix-config";
nodes.machine =
{ pkgs, ... }:
{
nix.settings = {
nix-path = [ "nonextra=/etc/value.nix" ];
extra-nix-path = [ "extra=/etc/value.nix" ];
};
testScript = ''
start_all()
machine.wait_for_unit("nix-daemon.socket")
# regression test for the workaround for https://github.com/NixOS/nix/issues/9487
print(machine.succeed("nix-instantiate --find-file extra"))
print(machine.succeed("nix-instantiate --find-file nonextra"))
'';
}
)
environment.etc."value.nix".text = "42";
};
testScript = ''
start_all()
machine.wait_for_unit("nix-daemon.socket")
# regression test for the workaround for https://github.com/NixOS/nix/issues/9487
print(machine.succeed("nix-instantiate --find-file extra"))
print(machine.succeed("nix-instantiate --find-file nonextra"))
'';
}