Skip to content

Commit

Permalink
tests/plugins/packer: test package options
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Aug 31, 2024
1 parent 56208f9 commit 910a77a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test-sources/plugins/pluginmanagers/packer.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{ lib, pkgs, ... }:
{
# Empty configuration
empty = {
Expand Down Expand Up @@ -136,10 +137,19 @@
};
};

no-packages = {
no-packages = cfg: {
plugins.packer = {
enable = true;
gitPackage = null;
};

assertions = [
{
assertion =
cfg.config.extraPackages != [ ]
-> lib.any (x: x.pname != null && x.pname != "git") cfg.config.extraPackages;
message = "A git package found when it wasn't expected";
}
];
};
}

0 comments on commit 910a77a

Please sign in to comment.