Add vmTest for Nixinate #16
2 changed files with 49 additions and 43 deletions
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, makeTest, inputs }:
|
{ pkgs, makeTest, inputs }:
|
||||||
{
|
{
|
||||||
vmTest = import ./vmTest { inherit pkgs makeTest inputs; };
|
vmTestLocal = (import ./vmTest { inherit pkgs makeTest inputs; }).local;
|
||||||
|
vmTestRemote = (import ./vmTest { inherit pkgs makeTest inputs; }).remote;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,7 @@ let
|
||||||
};
|
};
|
||||||
deployScript = inputs.self.nixinate.${pkgs.hostPlatform.system} (callLocklessFlake "${exampleFlake}" { nixpkgs = inputs.nixpkgs; });
|
deployScript = inputs.self.nixinate.${pkgs.hostPlatform.system} (callLocklessFlake "${exampleFlake}" { nixpkgs = inputs.nixpkgs; });
|
||||||
exampleSystem = (callLocklessFlake "${exampleFlake}" { nixpkgs = inputs.nixpkgs; }).nixosConfigurations.nixinatee.config.system.build.toplevel;
|
exampleSystem = (callLocklessFlake "${exampleFlake}" { nixpkgs = inputs.nixpkgs; }).nixosConfigurations.nixinatee.config.system.build.toplevel;
|
||||||
in
|
mkNixinateTest = buildOn: makeTest {
|
||||||
makeTest {
|
|
||||||
nodes = {
|
nodes = {
|
||||||
nixinatee = { ... }: {
|
nixinatee = { ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -69,7 +68,8 @@ makeTest {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
additionalPaths = [
|
additionalPaths = [
|
||||||
(allDrvOutputs exampleSystem)
|
(allDrvOutputs exampleSystem)
|
||||||
];
|
]
|
||||||
|
++ pkgs.lib.optional (buildOn == "remote") exampleFlake;
|
||||||
};
|
};
|
||||||
nix = {
|
nix = {
|
||||||
extraOptions =
|
extraOptions =
|
||||||
|
@ -101,4 +101,9 @@ makeTest {
|
||||||
"curl -sSf http:/127.0.0.1/ | grep title"
|
"curl -sSf http:/127.0.0.1/ | grep title"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
local = (mkNixinateTest "local");
|
||||||
|
remote = (mkNixinateTest "remote");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue