mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
tests/common.sh.in: Add enableFeatures helper
This commit is contained in:
parent
5d208cbe41
commit
d2586188fe
12 changed files with 13 additions and 22 deletions
|
@ -3,6 +3,8 @@ source common.sh
|
|||
clearStore
|
||||
clearProfiles
|
||||
|
||||
enableFeatures "ca-derivations ca-references"
|
||||
|
||||
# Make a flake.
|
||||
flake1Dir=$TEST_ROOT/flake1
|
||||
mkdir -p $flake1Dir
|
||||
|
@ -82,13 +84,13 @@ nix profile wipe-history
|
|||
# Test upgrade to CA package.
|
||||
printf true > $flake1Dir/ca.nix
|
||||
printf 3.0 > $flake1Dir/version
|
||||
nix profile upgrade --extra-experimental-features ca-derivations 0
|
||||
nix profile upgrade 0
|
||||
nix profile history | grep "packages.$system.default: 1.0 -> 3.0"
|
||||
|
||||
# Test new install of CA package.
|
||||
nix profile remove 0
|
||||
printf 4.0 > $flake1Dir/version
|
||||
printf Utrecht > $flake1Dir/who
|
||||
nix profile install --extra-experimental-features ca-derivations $flake1Dir
|
||||
nix profile install $flake1Dir
|
||||
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello Utrecht" ]]
|
||||
[[ $(nix path-info --json $(realpath $TEST_HOME/.nix-profile/bin/hello) | jq -r .[].ca) =~ fixed:r:sha256: ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue