aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libutil
diff options
context:
space:
mode:
authorAlois Wohlschlager <alois1@gmx-topmail.de>2024-09-02 20:09:35 +0200
committerAlois Wohlschlager <alois1@gmx-topmail.de>2024-10-15 19:55:50 +0200
commit4dbbd721eb9db75d4968a624b8cb9e75e979a144 (patch)
treeceee38ee4fc2acc806c124c65a8824f7db52e5c5 /tests/unit/libutil
parentf6077314fa6aff862758095bb55fe844e9162a1d (diff)
treewide: consistently mark overridden settings as such
Only overridden settings are sent to the daemon, and we're going to do the same for the build hook to. It needs to be ensured that overridden settings are in fact consistently marked as such, so that they actually get sent. Change-Id: I7cd58d925702f86cf2c35ad121eb191ceb62a355
Diffstat (limited to 'tests/unit/libutil')
-rw-r--r--tests/unit/libutil/config.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/libutil/config.cc b/tests/unit/libutil/config.cc
index 1600f4ff0..b10b288c1 100644
--- a/tests/unit/libutil/config.cc
+++ b/tests/unit/libutil/config.cc
@@ -57,7 +57,7 @@ namespace nix {
std::map<std::string, Config::SettingInfo> settings;
Setting<std::string> setting{&config, value, "name-of-the-setting", "description"};
- setting.assign("value");
+ setting.override("value");
config.getSettings(settings, /* overriddenOnly = */ false);
const auto iter = settings.find("name-of-the-setting");
@@ -131,7 +131,7 @@ namespace nix {
{
std::map<std::string, Config::SettingInfo> settings;
- setting.set("foo");
+ setting.setDefault("foo");
ASSERT_EQ(setting.get(), "foo");
config.getSettings(settings, /* overriddenOnly = */ true);
ASSERT_TRUE(settings.empty());
@@ -170,7 +170,7 @@ namespace nix {
"name-of-the-setting",
"description",
};
- setting.assign("value");
+ setting.override("value");
ASSERT_EQ(config.toJSON(),
R"#({
@@ -197,7 +197,7 @@ namespace nix {
true,
Xp::Flakes,
};
- setting.assign("value");
+ setting.override("value");
ASSERT_EQ(config.toJSON(),
R"#({