mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixosTests.docker-tools: Use unique binary in test case
This commit is contained in:
parent
48cfdc8ca5
commit
d0bcc212de
2 changed files with 6 additions and 2 deletions
|
@ -388,7 +388,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
|
||||||
with subtest("The image contains store paths referenced by the fakeRootCommands output"):
|
with subtest("The image contains store paths referenced by the fakeRootCommands output"):
|
||||||
docker.succeed(
|
docker.succeed(
|
||||||
"docker run --rm ${examples.layeredImageWithFakeRootCommands.imageName} /hello/bin/hello"
|
"docker run --rm ${examples.layeredImageWithFakeRootCommands.imageName} /hello/bin/layeredImageWithFakeRootCommands-hello"
|
||||||
)
|
)
|
||||||
|
|
||||||
with subtest("exportImage produces a valid tarball"):
|
with subtest("exportImage produces a valid tarball"):
|
||||||
|
|
|
@ -507,7 +507,11 @@ rec {
|
||||||
fakeRootCommands = ''
|
fakeRootCommands = ''
|
||||||
mkdir -p ./home/jane
|
mkdir -p ./home/jane
|
||||||
chown 1000 ./home/jane
|
chown 1000 ./home/jane
|
||||||
ln -s ${pkgs.pkgsStatic.hello} ./hello
|
ln -s ${pkgs.hello.overrideAttrs (o: {
|
||||||
|
# A unique `hello` to make sure that it isn't included via another mechanism by accident.
|
||||||
|
configureFlags = o.configureFlags or "" + " --program-prefix=layeredImageWithFakeRootCommands-";
|
||||||
|
doCheck = false;
|
||||||
|
})} ./hello
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue