nixos-config/tests/lib/nixos.nix

25 lines
514 B
Nix
Raw Normal View History

2024-03-08 08:39:13 +00:00
{ pkgs, lib, self }:
2025-01-29 04:48:19 +00:00
let testConfig = { formatAttr = "isoImage"; };
in lib.runTests {
2024-03-08 08:39:13 +00:00
testNixSystemHasFormat = {
expr = self.nixos.hasNixosFormat testConfig;
expected = true;
};
testNixSystemNoFormat = {
expr = self.nixos.hasNixosFormat { };
expected = false;
};
testNixSystemFormatCompare = {
expr = self.nixos.isFormat testConfig "isoImage";
expected = true;
};
testNixSystemFormatCompare2 = {
expr = self.nixos.isFormat { } "isoImage";
expected = false;
};
}