F: F2 promote the peers VM test and the module eval test into checks
The test nodes declare peers through the first-class module options, so LoadCredential and RefreshOnReload come from the module. Every node binds :: because the test network resolves node names to IPv6 first. poll() raises with the last observed status JSON.
This commit is contained in:
1 parent
4f5fa589ac
commit
ca000d973f
4 files changed
+167
-70
No files matched your search
@@ -21,22 +21,33 @@
|
||||
lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
};
|
||||
|
||||
# Acceptance test written ahead of the consolidator feature; fails until
|
||||
# it lands, so it stays out of `checks`. Build: nix build .#tests.x86_64-linux.peers -L
|
||||
tests.${system}.peers = import ./nix/tests/peers.nix {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
module = self.nixosModules.default;
|
||||
};
|
||||
|
||||
checks.${system} = import ./nix/checks.nix {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
package = self.packages.${system}.default;
|
||||
} // {
|
||||
package = self.packages.${system}.default;
|
||||
vm = import ./nix/tests/vm.nix {
|
||||
checks.${system} =
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
module = self.nixosModules.default;
|
||||
in
|
||||
{
|
||||
package = self.packages.${system}.default;
|
||||
vm = import ./nix/tests/vm.nix {
|
||||
inherit pkgs;
|
||||
module = self.nixosModules.default;
|
||||
};
|
||||
vm-peers = import ./nix/tests/peers.nix {
|
||||
inherit pkgs;
|
||||
module = self.nixosModules.default;
|
||||
};
|
||||
# Evaluation-only: every case renders the module's config and unit,
|
||||
# so forcing the list either lists the passed checks or throws. The
|
||||
# output file is only there to give `nix flake check` a derivation.
|
||||
module-peers = pkgs.runCommand "skyg-linux-tracker-module-peers-eval" { } ''
|
||||
printf '%s\n' ${
|
||||
nixpkgs.lib.escapeShellArg (
|
||||
builtins.concatStringsSep "\n" (import ./nix/tests/module-peers.nix {
|
||||
inherit pkgs;
|
||||
module = self.nixosModules.default;
|
||||
})
|
||||
)
|
||||
} > $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user