mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-15 19:58:09 +00:00
dockerTools: Test pullImage fetcher whenever its implementation changes
This commit is contained in:
parent
8e8b3fa1bb
commit
16a4da9127
@ -119,7 +119,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
|
||||
with subtest("The pullImage tool works"):
|
||||
docker.succeed(
|
||||
"docker load --input='${examples.nixFromDockerHub}'",
|
||||
"docker load --input='${examples.testNixFromDockerHub}'",
|
||||
"docker run --rm nix:2.2.1 nix-store --version",
|
||||
"docker rmi nix:2.2.1",
|
||||
)
|
||||
|
@ -95,6 +95,15 @@ rec {
|
||||
finalImageTag = "2.2.1";
|
||||
finalImageName = "nix";
|
||||
};
|
||||
# Same example, but re-fetches every time the fetcher implementation changes.
|
||||
# NOTE: Only use this for testing, or you'd be wasting a lot of time, network and space.
|
||||
testNixFromDockerHub = pkgs.invalidateFetcherByDrvHash pullImage {
|
||||
imageName = "nixos/nix";
|
||||
imageDigest = "sha256:85299d86263a3059cf19f419f9d286cc9f06d3c13146a8ebbb21b3437f598357";
|
||||
sha256 = "19fw0n3wmddahzr20mhdqv6jkjn1kanh6n2mrr08ai53dr8ph5n7";
|
||||
finalImageTag = "2.2.1";
|
||||
finalImageName = "nix";
|
||||
};
|
||||
|
||||
# 5. example of multiple contents, emacs and vi happily coexisting
|
||||
editors = buildImage {
|
||||
|
Loading…
Reference in New Issue
Block a user