2019-12-15 16:02:22 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
2016-02-02 18:03:13 +00:00
|
|
|
name = "initrd-network";
|
|
|
|
|
|
|
|
meta.maintainers = [ pkgs.stdenv.lib.maintainers.eelco ];
|
|
|
|
|
2018-07-20 21:56:59 +01:00
|
|
|
machine = { ... }: {
|
2016-02-02 18:03:13 +00:00
|
|
|
imports = [ ../modules/profiles/minimal.nix ];
|
|
|
|
boot.initrd.network.enable = true;
|
|
|
|
boot.initrd.network.postCommands =
|
|
|
|
''
|
|
|
|
ip addr | grep 10.0.2.15 || exit 1
|
|
|
|
ping -c1 10.0.2.2 || exit 1
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
2019-12-15 16:02:22 +00:00
|
|
|
start_all()
|
|
|
|
machine.wait_for_unit("multi-user.target")
|
|
|
|
machine.succeed("ip link >&2")
|
2016-02-02 18:03:13 +00:00
|
|
|
'';
|
|
|
|
})
|