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,36 +1,34 @@
# Test for NixOS' container nesting.
import ./make-test-python.nix (
{ pkgs, ... }:
{
name = "nested";
{ pkgs, ... }:
{
name = "nested";
meta = with pkgs.lib.maintainers; {
maintainers = [ sorki ];
};
meta = with pkgs.lib.maintainers; {
maintainers = [ sorki ];
};
nodes.machine =
{ lib, ... }:
let
makeNested = subConf: {
containers.nested = {
autoStart = true;
privateNetwork = true;
config = subConf;
};
nodes.machine =
{ lib, ... }:
let
makeNested = subConf: {
containers.nested = {
autoStart = true;
privateNetwork = true;
config = subConf;
};
in
makeNested (makeNested { });
};
in
makeNested (makeNested { });
testScript = ''
machine.start()
machine.wait_for_unit("container@nested.service")
machine.succeed("systemd-run --pty --machine=nested -- machinectl list | grep nested")
print(
machine.succeed(
"systemd-run --pty --machine=nested -- systemd-run --pty --machine=nested -- systemctl status"
)
)
'';
}
)
testScript = ''
machine.start()
machine.wait_for_unit("container@nested.service")
machine.succeed("systemd-run --pty --machine=nested -- machinectl list | grep nested")
print(
machine.succeed(
"systemd-run --pty --machine=nested -- systemd-run --pty --machine=nested -- systemctl status"
)
)
'';
}