aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/tests
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-19 11:33:48 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-19 12:44:38 -0400
commit20decfd30261bd46d2bf78209cb2bdd144fcd0b4 (patch)
treecfeebbade5d503baea69af2a66b88e0df5ff47eb /src/libstore/tests
parent76baaeb341cf395c61877e6d598c290835529ca0 (diff)
Gate `dynamic-derivations` with drv `fromJSON` too
Don't want `nix derivation add` to be a way to sneak by experimental feature checks!
Diffstat (limited to 'src/libstore/tests')
-rw-r--r--src/libstore/tests/derivation.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libstore/tests/derivation.cc b/src/libstore/tests/derivation.cc
index 48524a710..85e451b29 100644
--- a/src/libstore/tests/derivation.cc
+++ b/src/libstore/tests/derivation.cc
@@ -26,6 +26,14 @@ class CaDerivationTest : public DerivationTest
}
};
+class DynDerivationTest : public DerivationTest
+{
+ void SetUp() override
+ {
+ mockXpSettings.set("experimental-features", "dynamic-derivations ca-derivations");
+ }
+};
+
class ImpureDerivationTest : public DerivationTest
{
void SetUp() override
@@ -83,7 +91,7 @@ TEST_JSON(DerivationTest, caFixed,
}),
"drv-name", "output-name")
-TEST_JSON(CaDerivationTest, caFixedText,
+TEST_JSON(DynDerivationTest, caFixedText,
R"({
"hashAlgo": "text:sha256",
"hash": "894517c9163c896ec31a2adbd33c0681fd5f45b2c0ef08a64c92a03fb97f390f",