Test the non-experimental fetchtree

Run the fetchTree-file test without the experimental feature to make
sure that it works properly
This commit is contained in:
Théophane Hufschmitt 2024-02-23 15:04:54 +01:00
parent f0fd3f7c0a
commit 9553fc5a53
2 changed files with 9 additions and 0 deletions

View File

@ -232,6 +232,12 @@ enableFeatures() {
sed -i 's/experimental-features .*/& '"$features"'/' "$NIX_CONF_DIR"/nix.conf
}
disableFeature() {
local feature="$1"
sed -i '/^\(extra-\)\?experimental-features/s/\b'"$feature"'\b//g' "$NIX_CONF_DIR"/nix.conf
sed -i '/^\(extra-\)\?experimental-features/s/\b'"$feature"'\b//g' "$NIX_CONF_DIR"/nix.conf.extra
}
set -x
onError() {

View File

@ -2,6 +2,8 @@ source common.sh
clearStore
disableFeature "flakes"
cd "$TEST_ROOT"
test_fetch_file () {
@ -21,6 +23,7 @@ EOF
# Make sure that `http(s)` and `file` flake inputs are properly extracted when
# they should be, and treated as opaque files when they should be
test_file_flake_input () {
enableFeatures "flakes"
rm -fr "$TEST_ROOT/testFlake";
mkdir "$TEST_ROOT/testFlake";
pushd testFlake