Skip to content

Commit ce65217

Browse files
committed
tests/plugins/packer: test package options
1 parent 56208f9 commit ce65217

File tree

1 file changed

+11
-1
lines changed
  • tests/test-sources/plugins/pluginmanagers

1 file changed

+11
-1
lines changed

tests/test-sources/plugins/pluginmanagers/packer.nix

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{ lib, pkgs, ... }:
12
{
23
# Empty configuration
34
empty = {
@@ -136,10 +137,19 @@
136137
};
137138
};
138139

139-
no-packages = {
140+
no-packages = cfg: {
140141
plugins.packer = {
141142
enable = true;
142143
gitPackage = null;
143144
};
145+
146+
assertions = [
147+
{
148+
assertion =
149+
cfg.config.extraPackages == [ ]
150+
|| lib.any (x: lib.trace "${x.pname or ""}" x.pname or null != "git") cfg.config.extraPackages;
151+
message = "A git package found when it wasn't expected";
152+
}
153+
];
144154
};
145155
}

0 commit comments

Comments
 (0)