-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from ryan4yin/nixos-tests
feat(WIP): add nixos tests - integration tests
- Loading branch information
Showing
3 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters