aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/tests
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/populate/tests')
-rw-r--r--pkgs/populate/tests/scenarios.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/populate/tests/scenarios.nix b/pkgs/populate/tests/scenarios.nix
index 33a2171..0c0ce9e 100644
--- a/pkgs/populate/tests/scenarios.nix
+++ b/pkgs/populate/tests/scenarios.nix
@@ -1096,6 +1096,28 @@ in
}
];
}))
+ # A symlink source where a directory is, e.g. a source that had another
+ # type: ln -f doesn't replace directories.
+ (s "symlink-replaces-directory" {
+ phases = [
+ {
+ sources.x.file = "/fixtures/alt";
+ check = ''
+ test -d "$T"/x || fail "x isn't a directory"
+ '';
+ }
+ {
+ sources = {
+ a.file = "/fixtures/alt";
+ x.symlink = "a";
+ };
+ check = ''
+ expect_eq x "$(readlink "$T"/x)" a
+ test -e "$T"/x/flake.nix || fail "flake.nix missing"
+ '';
+ }
+ ];
+ })
(s "cycle" {
phases = [{
sources = {