[Backport release-26.05] tests.{trivial-builders.symlinkJoin,replaceVars}: fix group mismatches (#533733)

This commit is contained in:
Michael Daniels 2026-06-20 21:04:14 +00:00 committed by GitHub
commit 73cf7c0274
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 11 deletions

View file

@ -1,7 +1,7 @@
{
symlinkJoin,
writeTextFile,
runCommand,
runCommandLocal,
testers,
}:
@ -31,7 +31,7 @@ let
text = "qux";
};
emulatedSymlinkJoinFooBarStrip = runCommand "symlinkJoin-strip-foo-bar" { } ''
emulatedSymlinkJoinFooBarStrip = runCommandLocal "symlinkJoin-strip-foo-bar" { } ''
mkdir $out
ln -s ${foo}/etc/test.d/foo $out/
ln -s ${bar}/etc/test.d/bar $out/
@ -48,7 +48,7 @@ in
baz
];
};
expected = runCommand "symlinkJoin-foo-bar-baz" { } ''
expected = runCommandLocal "symlinkJoin-foo-bar-baz" { } ''
mkdir -p $out/{var/lib/arbitrary,etc/test.d}
ln -s {${foo},${bar}}/etc/test.d/* $out/etc/test.d
ln -s ${baz}/var/lib/arbitrary/baz $out/var/lib/arbitrary/
@ -66,7 +66,7 @@ in
baz
];
};
expected = runCommand "symlinkJoin-foo-bar-baz" { } ''
expected = runCommandLocal "symlinkJoin-foo-bar-baz" { } ''
mkdir -p $out/{var/lib/arbitrary,etc/test.d}
ln -s {${foo},${bar}}/etc/test.d/* $out/etc/test.d
ln -s ${baz}/var/lib/arbitrary/baz $out/var/lib/arbitrary/
@ -115,7 +115,7 @@ in
};
symlinkJoin-fails-on-missing =
runCommand "symlinkJoin-fails-on-missing"
runCommandLocal "symlinkJoin-fails-on-missing"
{
failed = testBuildFailure (symlinkJoin {
name = "symlinkJoin-fail";
@ -134,7 +134,7 @@ in
'';
symlinkJoin-fails-on-file =
runCommand "symlinkJoin-fails-on-file"
runCommandLocal "symlinkJoin-fails-on-file"
{
failed = testBuildFailure (symlinkJoin {
name = "symlinkJoin-fail";

View file

@ -6,6 +6,7 @@
lib,
runCommand,
testers,
writeText,
}:
let
inherit (testers) testEqualContents testBuildFailure;
@ -22,7 +23,7 @@ let
};
expected = mkExpectation (
builtins.toFile "source.txt" ''
writeText "source.txt" ''
All human beings are born free and are the same in dignity and rights.
They are endowed with reason and conscience and should act towards
one another in a spirit of shared humanity.
@ -53,7 +54,7 @@ let
{
failed =
let
src = builtins.toFile "source.txt" ''
src = writeText "source.txt" ''
Header.
before @whatIsThis@ middle @It'sOdd2Me@ after.
@cannot detect due to space@
@ -86,7 +87,7 @@ let
};
expected = mkExpectation (
builtins.toFile "source.txt" ''
writeText "source.txt" ''
All human beings are born free and are the same in dignity and rights.
They are endowed with reason and conscience and should act towards
one another in a spirit of @brotherhood@.
@ -101,7 +102,7 @@ let
{
failed =
let
src = builtins.toFile "source.txt" ''
src = writeText "source.txt" ''
@a@
@b@
@c@
@ -127,7 +128,7 @@ let
{
failed =
let
src = builtins.toFile "source.txt" ''
src = writeText "source.txt" ''
@a@
@b@
'';