mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 10:18:37 +02:00
feat(WIP): add nixos tests - integration tests
This commit is contained in:
37
outputs/x86_64-linux/nixos-tests/idols-ruby.nix
Normal file
37
outputs/x86_64-linux/nixos-tests/idols-ruby.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
nixos-modules,
|
||||
# TODO: test home-manager too.
|
||||
home-modules ? [],
|
||||
myvars,
|
||||
...
|
||||
}: let
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
pkgs.testers.runNixOSTest {
|
||||
name = "NixOS Tests for Idols Ruby";
|
||||
|
||||
node = {
|
||||
inherit pkgs;
|
||||
specialArgs = genSpecialArgs system;
|
||||
pkgsReadOnly = false;
|
||||
};
|
||||
|
||||
nodes = {
|
||||
ruby.imports = nixos-modules;
|
||||
};
|
||||
|
||||
# Note that machine1 and machine2 are now available as
|
||||
# Python objects and also as hostnames in the virtual network
|
||||
testScript = ''
|
||||
ruby.wait_for_unit("network-online.target")
|
||||
|
||||
ruby.succeed("curl https://baidu.com")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user