mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-09-21 15:49:12 +00:00
tests: improve env tests and move to tests dir
This commit is contained in:
parent
d487f94a7a
commit
7449e8905b
3 changed files with 12 additions and 8 deletions
18
test.nix
18
test.nix
|
@ -1,18 +0,0 @@
|
|||
# Realizes <num>> of derivations with size of <size>MB
|
||||
{ size ? 1 # MB
|
||||
, num ? 10 # count
|
||||
, currentTime ? builtins.currentTime
|
||||
, noChroot ? false
|
||||
}:
|
||||
|
||||
with import <nixpkgs> {};
|
||||
|
||||
let
|
||||
drv = i: runCommand "${toString currentTime}-${toString i}" {
|
||||
__noChroot = noChroot;
|
||||
} ''
|
||||
dd if=/dev/zero of=$out bs=${toString size}MB count=1
|
||||
'';
|
||||
in writeText "empty-${toString num}-${toString size}MB" ''
|
||||
${lib.concatMapStringsSep "" drv (lib.range 1 num)}
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue