cli: disallow ca derivations

we no longer have any experimental features depending on ca derivations,
so we can start removing them. since ca derivations are very invasive we
will need a while to remove all of the explicitly experimental code, and
even then we will not have removed *all* code related to ca derivations.
especially in the derivation goals there is a lot of code that is not as
easy to disentangle from experimental features as some would have hoped.

Change-Id: Ia456aadc6164613ded343f571318494d9310a549
This commit is contained in:
eldritch horrors
2025-05-20 13:27:04 +02:00
parent 0fbbb1e49b
commit dad28eca75
35 changed files with 7 additions and 665 deletions
+1 -12
View File
@@ -344,22 +344,11 @@ template<> std::string BaseSetting<StringSet>::to_string() const
template<> ExperimentalFeatures BaseSetting<ExperimentalFeatures>::parse(const std::string & str, const ApplyConfigOptions & options) const
{
auto warnDeprecated294 = [](std::once_flag & flag, std::string_view thing) {
std::call_once(flag, [&] {
warn(
"The %s experimental feature is deprecated and will be removed in Lix 2.94. "
"See https://git.lix.systems/lix-project/lix/issues/815 for more details.",
thing
);
});
};
ExperimentalFeatures res{};
for (auto & s : tokenizeString<StringSet>(str)) {
if (auto thisXpFeature = parseExperimentalFeature(s); thisXpFeature) {
if (*thisXpFeature == Xp::CaDerivations) {
static std::once_flag warned;
warnDeprecated294(warned, s);
throw Error("CA derivations are no longer supported");
}
res = res | thisXpFeature.value();
} else
@@ -1,9 +0,0 @@
source common.sh
file=build-hook-ca-floating.nix
enableFeatures "ca-derivations"
CONTENT_ADDRESSED=true
source build-remote.sh
-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/env bash
source common.sh
# The substituters didn't work prior to this time.
requireDaemonNewerThan "2.18.0pre20230808"
drv=$(nix-instantiate ./content-addressed.nix -A rootCA --arg seed 1)^out
nix derivation show "$drv" --arg seed 1
buildAttr () {
local derivationPath=$1
local seedValue=$2
shift; shift
local args=("./content-addressed.nix" "-A" "$derivationPath" --arg seed "$seedValue" "--no-out-link")
args+=("$@")
nix-build "${args[@]}"
}
copyAttr () {
local derivationPath=$1
local seedValue=$2
shift; shift
local args=("-f" "./content-addressed.nix" "$derivationPath" --arg seed "$seedValue")
args+=("$@")
# Note: to copy CA derivations, we need to copy the realisations, which
# currently requires naming the installables, not just the derivation output
# path.
nix copy --to file://$cacheDir "${args[@]}"
}
testRemoteCacheFor () {
local derivationPath=$1
clearCache
copyAttr "$derivationPath" 1
clearStore
# Check nothing gets built.
buildAttr "$derivationPath" 1 --option substituters file://$cacheDir --no-require-sigs |& grepQuietInverse " will be built:"
}
testRemoteCache () {
testRemoteCacheFor rootCA
testRemoteCacheFor dependentCA
testRemoteCacheFor dependentNonCA
testRemoteCacheFor dependentFixedOutput
testRemoteCacheFor dependentForBuildCA
testRemoteCacheFor dependentForBuildNonCA
}
clearStore
testRemoteCache
-5
View File
@@ -1,5 +0,0 @@
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd .. && source build-dry.sh
@@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Regression test for https://github.com/NixOS/nix/issues/4858
source common.sh
requireDaemonNewerThan "2.4pre20210621"
# Get the output path of `rootCA`, and put some garbage instead
outPath="$(nix-build ./content-addressed.nix -A rootCA --no-out-link)"
nix-store --delete $(nix-store -q --referrers-closure "$outPath")
touch "$outPath"
# The build should correctly remove the garbage and put the expected path instead
nix-build ./content-addressed.nix -A rootCA --no-out-link
# Rebuild it. This shouldnt overwrite the existing path
oldInode=$(stat -c '%i' "$outPath")
nix-build ./content-addressed.nix -A rootCA --no-out-link --arg seed 2
newInode=$(stat -c '%i' "$outPath")
[[ "$oldInode" == "$newInode" ]]
-67
View File
@@ -1,67 +0,0 @@
#!/usr/bin/env bash
source common.sh
drv=$(nix-instantiate ./content-addressed.nix -A rootCA --arg seed 1)^out
nix derivation show "$drv" --arg seed 1
buildAttr () {
local derivationPath=$1
local seedValue=$2
shift; shift
local args=("./content-addressed.nix" "-A" "$derivationPath" --arg seed "$seedValue" "--no-out-link")
args+=("$@")
nix-build "${args[@]}"
}
testDeterministicCA () {
[[ $(buildAttr rootCA 1) = $(buildAttr rootCA 2) ]]
}
testCutoffFor () {
local out1 out2
out1=$(buildAttr $1 1)
# The seed only changes the root derivation, and not it's output, so the
# dependent derivations should only need to be built once.
buildAttr rootCA 2
out2=$(buildAttr $1 2 -j0)
test "$out1" == "$out2"
}
testCutoff () {
# Don't directly build dependentCA, that way we'll make sure we don't rely on
# dependent derivations always being already built.
#testDerivation dependentCA
testCutoffFor transitivelyDependentCA
testCutoffFor dependentNonCA
testCutoffFor dependentFixedOutput
}
testGC () {
nix-instantiate ./content-addressed.nix -A rootCA --arg seed 5
nix-collect-garbage --option keep-derivations true
clearStore
buildAttr rootCA 1 --out-link $TEST_ROOT/rootCA
nix-collect-garbage
buildAttr rootCA 1 -j0
}
testNixCommand () {
clearStore
nix build --file ./content-addressed.nix --no-link
}
# Regression test for https://github.com/NixOS/nix/issues/4775
testNormalization () {
clearStore
outPath=$(buildAttr rootCA 1)
test "$(stat -c %Y $outPath)" -eq 1
}
clearStore
testNormalization
testDeterministicCA
clearStore
testCutoff
testGC
testNixCommand
-5
View File
@@ -1,5 +0,0 @@
source ../common.sh
enableFeatures "ca-derivations"
restartDaemon
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Ensure that we cant build twice the same derivation concurrently.
# Regression test for https://github.com/NixOS/nix/issues/5029
source common.sh
buggyNeedLocalStore "For some reason, this deadlocks with the daemon"
export NIX_TESTS_CA_BY_DEFAULT=1
clearStore
for i in {0..5}; do
nix build --no-link --file ./racy.nix &
done
wait
-1
View File
@@ -1 +0,0 @@
../config.nix.in
-100
View File
@@ -1,100 +0,0 @@
with import ./config.nix;
let mkCADerivation = args: mkDerivation ({
__contentAddressed = true;
outputHashMode = "recursive";
outputHashAlgo = "sha256";
} // args);
in
{ seed ? 0 }:
# A simple content-addressed derivation.
# The derivation can be arbitrarily modified by passing a different `seed`,
# but the output will always be the same
rec {
rootLegacy = mkDerivation {
name = "simple-input-addressed";
buildCommand = ''
set -x
echo "Building a legacy derivation"
mkdir -p $out
echo "Hello World" > $out/hello
'';
};
rootCA = mkCADerivation {
name = "rootCA";
outputs = [ "out" "dev" "foo" ];
buildCommand = ''
echo "building a CA derivation"
echo "The seed is ${toString seed}"
mkdir -p $out
echo ${rootLegacy}/hello > $out/dep
ln -s $out $out/self
# test symlinks at root
ln -s $out $dev
ln -s $out $foo
'';
};
dependentCA = mkCADerivation {
name = "dependent";
buildCommand = ''
echo "building a dependent derivation"
mkdir -p $out
cat ${rootCA}/self/dep
echo ${rootCA}/self/dep > $out/dep
'';
};
transitivelyDependentCA = mkCADerivation {
name = "transitively-dependent";
buildCommand = ''
echo "building transitively-dependent"
cat ${dependentCA}/dep
echo ${dependentCA} > $out
'';
};
dependentNonCA = mkDerivation {
name = "dependent-non-ca";
buildCommand = ''
echo "Didn't cut-off"
echo "building dependent-non-ca"
mkdir -p $out
echo ${rootCA}/non-ca-hello > $out/dep
'';
};
dependentForBuildCA = mkCADerivation {
name = "dependent-for-build-ca";
buildCommand = ''
echo "Depends on rootCA for building only"
mkdir -p $out
echo ${rootCA}
touch $out
'';
};
dependentForBuildNonCA = mkDerivation {
name = "dependent-for-build-non-ca";
buildCommand = ''
echo "Depends on rootCA for building only"
mkdir -p $out
echo ${rootCA}
touch $out
'';
};
dependentFixedOutput = mkDerivation {
name = "dependent-fixed-output";
outputHashMode = "recursive";
outputHash = "sha512-7aJcmSuEuYP5tGKcmGY8bRr/lrCjJlOxP2mIUjO/vMQeg6gx/65IbzRWES8EKiPDOs9z+wF30lEfcwxM/cT4pw==";
buildCommand = ''
cat ${dependentCA}/dep
echo foo > $out
'';
};
runnable = mkCADerivation rec {
name = "runnable-thing";
buildCommand = ''
mkdir -p $out/bin
echo ${rootCA} # Just to make it depend on it
echo "#! ${shell}" > $out/bin/${name}
chmod +x $out/bin/${name}
'';
};
}
-29
View File
@@ -1,29 +0,0 @@
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
drvPath=$(nix-instantiate ../simple.nix)
nix derivation show $drvPath | jq .[] > $TEST_HOME/simple.json
drvPath2=$(nix derivation add < $TEST_HOME/simple.json)
[[ "$drvPath" = "$drvPath2" ]]
# Content-addressed derivations can be renamed.
jq '.name = "foo"' < $TEST_HOME/simple.json > $TEST_HOME/foo.json
drvPath3=$(nix derivation add --dry-run < $TEST_HOME/foo.json)
# With --dry-run nothing is actually written
[[ ! -e "$drvPath3" ]]
# But the JSON is rejected without the experimental feature
expectStderr 1 nix derivation add < $TEST_HOME/foo.json --experimental-features nix-command | grepQuiet "experimental Lix feature 'ca-derivations' is disabled"
# Without --dry-run it is actually written
drvPath4=$(nix derivation add < $TEST_HOME/foo.json)
[[ "$drvPath4" = "$drvPath3" ]]
[[ -e "$drvPath3" ]]
# The modified derivation read back as JSON matches
nix derivation show $drvPath3 | jq .[] > $TEST_HOME/foo-read.json
diff $TEST_HOME/foo.json $TEST_HOME/foo-read.json
@@ -1,26 +0,0 @@
source ./common.sh
requireDaemonNewerThan "2.4pre20210625"
export REMOTE_STORE_DIR="$TEST_ROOT/remote_store"
export REMOTE_STORE="file://$REMOTE_STORE_DIR"
rm -rf $REMOTE_STORE_DIR
clearStore
# Build dep1 and push that to the binary cache.
# This entails building (and pushing) current-time.
nix copy --to "$REMOTE_STORE" -f nondeterministic.nix dep1
clearStore
sleep 2 # To make sure that `$(date)` will be different
# Build dep2.
# As weve cleared the cache, well have to rebuild current-time. And because
# the current time isnt the same as before, this will yield a new (different)
# realisation
nix build -f nondeterministic.nix dep2 --no-link
# Build something that depends both on dep1 and dep2.
# If everything goes right, we should rebuild dep2 rather than fetch it from
# the cache (because that would mean duplicating `current-time` in the closure),
# and have `dep1 == dep2`.
nix build --substituters "$REMOTE_STORE" -f nondeterministic.nix toplevel --no-require-sigs --no-link
-10
View File
@@ -1,10 +0,0 @@
#!/usr/bin/env bash
# Ensure that garbage collection works properly with ca derivations
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd ..
source eval-store.sh
-3
View File
@@ -1,3 +0,0 @@
{
outputs = { self }: import ./content-addressed.nix {};
}
-10
View File
@@ -1,10 +0,0 @@
#!/usr/bin/env bash
# Ensure that garbage collection works properly with ca derivations
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd ..
source gc.sh
-5
View File
@@ -1,5 +0,0 @@
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd .. && source import-derivation.sh
-6
View File
@@ -1,6 +0,0 @@
# test_confdata set from tests/functional/meson.build
configure_file(
input : 'config.nix.in',
output : 'config.nix',
configuration : test_confdata,
)
-5
View File
@@ -1,5 +0,0 @@
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd ..
source ./build.sh
-31
View File
@@ -1,31 +0,0 @@
#!/usr/bin/env bash
source common.sh
export REMOTE_STORE_DIR="$TEST_ROOT/remote_store"
export REMOTE_STORE="file://$REMOTE_STORE_DIR"
ensureCorrectlyCopied () {
attrPath="$1"
nix build --store "$REMOTE_STORE" --file ./content-addressed.nix "$attrPath"
}
testOneCopy () {
clearStore
rm -rf "$REMOTE_STORE_DIR"
attrPath="$1"
nix copy --to $REMOTE_STORE "$attrPath" --file ./content-addressed.nix
ensureCorrectlyCopied "$attrPath"
# Ensure that we can copy back what we put in the store
clearStore
nix copy --from $REMOTE_STORE \
--file ./content-addressed.nix "$attrPath" \
--no-check-sigs
}
for attrPath in rootCA dependentCA transitivelyDependentCA dependentNonCA dependentFixedOutput; do
testOneCopy "$attrPath"
done
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env bash
source common.sh
FLAKE_PATH=path:$PWD
nix run --no-write-lock-file $FLAKE_PATH#runnable
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env bash
source common.sh
CONTENT_ADDRESSED=true
cd ../nix-shell
source ./basic.sh
-34
View File
@@ -1,34 +0,0 @@
with import ./config.nix;
let mkCADerivation = args: mkDerivation ({
__contentAddressed = true;
outputHashMode = "recursive";
outputHashAlgo = "sha256";
} // args);
in
rec {
currentTime = mkCADerivation {
name = "current-time";
buildCommand = ''
mkdir $out
echo $(date) > $out/current-time
'';
};
dep = seed: mkCADerivation {
name = "dep";
inherit seed;
buildCommand = ''
echo ${currentTime} > $out
'';
};
dep1 = dep 1;
dep2 = dep 2;
toplevel = mkCADerivation {
name = "toplevel";
buildCommand = ''
test ${dep1} == ${dep2}
touch $out
'';
};
}
-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/env bash
source common.sh
requireDaemonNewerThan "2.4pre20210626"
export NIX_TESTS_CA_BY_DEFAULT=1
cd ..
source ./post-hook.sh
-15
View File
@@ -1,15 +0,0 @@
# A derivation that would certainly fail if several builders tried to
# build it at once.
with import ./config.nix;
mkDerivation {
name = "simple";
buildCommand = ''
mkdir $out
echo bar >> $out/foo
sleep 3
[[ "$(cat $out/foo)" == bar ]]
'';
}
-5
View File
@@ -1,5 +0,0 @@
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd .. && source repl.sh
-11
View File
@@ -1,11 +0,0 @@
#!/usr/bin/env bash
source common.sh
requireDaemonNewerThan "2.4pre20210626"
enableFeatures "ca-derivations nix-command flakes"
export NIX_TESTS_CA_BY_DEFAULT=1
cd ..
source ./selfref-gc.sh
-36
View File
@@ -1,36 +0,0 @@
source common.sh
clearStore
clearCache
nix-store --generate-binary-cache-key cache1.example.org $TEST_ROOT/sk1 $TEST_ROOT/pk1
pk1=$(cat $TEST_ROOT/pk1)
export REMOTE_STORE_DIR="$TEST_ROOT/remote_store"
export REMOTE_STORE="file://$REMOTE_STORE_DIR"
ensureCorrectlyCopied () {
attrPath="$1"
nix build --store "$REMOTE_STORE" --file ./content-addressed.nix "$attrPath"
}
testOneCopy () {
clearStore
rm -rf "$REMOTE_STORE_DIR"
attrPath="$1"
nix copy -vvvv --to $REMOTE_STORE "$attrPath" --file ./content-addressed.nix \
--secret-key-files "$TEST_ROOT/sk1" --show-trace
ensureCorrectlyCopied "$attrPath"
# Ensure that we can copy back what we put in the store
clearStore
nix copy --from $REMOTE_STORE \
--file ./content-addressed.nix "$attrPath" \
--trusted-public-keys $pk1
}
for attrPath in rootCA dependentCA transitivelyDependentCA dependentNonCA dependentFixedOutput; do
testOneCopy "$attrPath"
done
-71
View File
@@ -1,71 +0,0 @@
#!/usr/bin/env bash
# Ensure that binary substitution works properly with ca derivations
source common.sh
needLocalStore "“--no-require-sigs” cant be used with the daemon"
rm -rf $TEST_ROOT/binary_cache
export REMOTE_STORE_DIR=$TEST_ROOT/binary_cache
export REMOTE_STORE=file://$REMOTE_STORE_DIR
buildDrvs () {
nix build --file ./content-addressed.nix -L --no-link "$@"
}
# Populate the remote cache
clearStore
nix copy --to $REMOTE_STORE --file ./content-addressed.nix
# Restart the build on an empty store, ensuring that we don't build
clearStore
buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0 transitivelyDependentCA
# Check that the thing weve just substituted has its realisation stored
nix realisation info --file ./content-addressed.nix transitivelyDependentCA
# Check that its dependencies have it too
nix realisation info --file ./content-addressed.nix dependentCA
# nix realisation info --file ./content-addressed.nix rootCA --outputs out
if isDaemonNewer "2.13"; then
pushToStore="../push-to-store.sh"
else
pushToStore="../push-to-store-old.sh"
fi
# Same thing, but
# 1. With non-ca derivations
# 2. Erasing the realisations on the remote store
#
# Even in that case, realising the derivations should still produce the right
# realisations on the local store
#
# Regression test for #4725
clearStore
nix build --file ../simple.nix -L --no-link --post-build-hook "$pushToStore"
clearStore
rm -r "$REMOTE_STORE_DIR/realisations"
nix build --file ../simple.nix -L --no-link --substitute --substituters "$REMOTE_STORE" --no-require-sigs -j0
# There's no easy way to check whether a realisation is present on the local
# store short of manually querying the db, but the build environment doesn't
# have the sqlite binary so we instead push things again, and check that the
# realisations have correctly been pushed to the remote store
nix copy --to "$REMOTE_STORE" --file ../simple.nix
if [[ -z "$(ls "$REMOTE_STORE_DIR/realisations")" ]]; then
echo "Realisations not rebuilt"
exit 1
fi
# Test the local realisation disk cache
buildDrvs --post-build-hook "$pushToStore"
clearStore
# Add the realisations of rootCA to the cachecache
clearCacheCache
export _NIX_FORCE_HTTP=1
buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0
# Try rebuilding, but remove the realisations from the remote cache to force
# using the cachecache
clearStore
rm $REMOTE_STORE_DIR/realisations/*
buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0
-5
View File
@@ -1,5 +0,0 @@
source common.sh
export NIX_TESTS_CA_BY_DEFAULT=1
cd .. && source why-depends.sh
+1 -22
View File
@@ -23,9 +23,7 @@ config_nix_in = configure_file(
configuration : test_confdata,
)
# Just configures `ca/config.nix.in`. Done as a subdir() for the same reason as above.
subdir('ca')
# Just configures `nix-shell/config.nix.in`. Same as above.
# Just configures `nix-shell/config.nix.in`. Done as a subdir() for the same reason as above.
subdir('nix-shell')
subdir('plugins')
@@ -34,24 +32,6 @@ subdir('test-libstoreconsumer')
functional_tests_scripts = [
'init.sh',
'test-infra.sh',
'ca/build.sh',
'ca/build-cache.sh',
'ca/concurrent-builds.sh',
'ca/derivation-json.sh',
'ca/duplicate-realisation-in-closure.sh',
'ca/eval-store.sh',
'ca/gc.sh',
'ca/import-derivation.sh',
'ca/new-build-cmd.sh',
'ca/nix-copy.sh',
'ca/nix-run.sh',
'ca/nix-shell.sh',
'ca/post-hook.sh',
'ca/repl.sh',
'ca/selfref-gc.sh',
'ca/signatures.sh',
'ca/substitute.sh',
'ca/why-depends.sh',
'flakes/flakes.sh',
'flakes/develop.sh',
'flakes/develop-r8854.sh',
@@ -121,7 +101,6 @@ functional_tests_scripts = [
'dependencies.sh',
'check-reqs.sh',
'build-remote-content-addressed-fixed.sh',
'build-remote-content-addressed-floating.sh',
'build-remote-trustless-should-pass-0.sh',
'build-remote-trustless-should-pass-1.sh',
'build-remote-trustless-should-pass-2.sh',
+1 -16
View File
@@ -3,7 +3,6 @@ source common.sh
clearStore
clearProfiles
enableFeatures "ca-derivations"
restartDaemon
# Make a flake.
@@ -105,24 +104,10 @@ nix profile remove simple-1 2>&1 | grep 'removed 1 packages'
nix profile wipe-history
[[ $(nix profile history | grep Version | wc -l) -eq 1 ]]
# Test upgrade to CA package.
printf true > $flake1Dir/ca.nix
printf 3.0 > $flake1Dir/version
nix profile upgrade flake1
nix profile history | grep "packages.$system.default: 1.0, 1.0-man -> 3.0, 3.0-man"
# Test new install of CA package.
nix profile remove flake1 2>&1 | grep 'removed 1 packages'
printf 4.0 > $flake1Dir/version
printf Utrecht > $flake1Dir/who
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: ]]
# Override the outputs.
nix profile remove simple flake1
nix profile install "$flake1Dir^*"
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello Utrecht" ]]
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello NixOS" ]]
[ -e $TEST_HOME/.nix-profile/share/man ]
[ -e $TEST_HOME/.nix-profile/include ]
-10
View File
@@ -125,16 +125,6 @@ drvPath
' '".*-simple.drv"' \
--file $testDir/simple.nix
testReplResponse '
drvPath
' '".*-simple.drv"' \
--file $testDir/simple.nix --experimental-features 'ca-derivations'
testReplResponse '
drvPath
' '".*-simple.drv"' \
--file $testDir/simple.nix --extra-experimental-features 'ca-derivations'
mkdir -p flake && cat <<EOF > flake/flake.nix
{
outputs = { self }: {
+1 -1
View File
@@ -46,7 +46,7 @@ RC_GTEST_FIXTURE_PROP(
* to worry about race conditions if the tests run concurrently.
*/
ExperimentalFeatureSettings mockXpSettings;
mockXpSettings.set("experimental-features", "ca-derivations");
mockXpSettings.experimentalFeatures.override(ExperimentalFeatures{} | Xp::CaDerivations);
auto * v = evaluator.mem.allocValue();
state.mkOutputString(*v, b, std::nullopt, mockXpSettings);
+2 -1
View File
@@ -1,6 +1,7 @@
#include <gtest/gtest.h>
#include "lix/libstore/derivations.hh"
#include "lix/libutil/experimental-features.hh"
#include "lix/libutil/json.hh"
#include "lix/libutil/strings.hh"
@@ -29,7 +30,7 @@ class CaDerivationTest : public DerivationTest
{
void SetUp() override
{
mockXpSettings.set("experimental-features", "ca-derivations");
mockXpSettings.experimentalFeatures.override(ExperimentalFeatures{} | Xp::CaDerivations);
}
};
@@ -10,7 +10,7 @@ TEST(DownstreamPlaceholder, unknownCaOutput) {
* to worry about race conditions if the tests run concurrently.
*/
ExperimentalFeatureSettings mockXpSettings;
mockXpSettings.set("experimental-features", "ca-derivations");
mockXpSettings.experimentalFeatures.override(ExperimentalFeatures{} | Xp::CaDerivations);
ASSERT_EQ(
DownstreamPlaceholder::unknownCaOutput(