mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
nix-testing
-> daemon-trust-override
And only enable in the tests that need it. This makes it less of a sledgehammer.
This commit is contained in:
parent
b1343e8ad1
commit
e95db8f2b9
7 changed files with 23 additions and 10 deletions
|
@ -190,12 +190,13 @@ constexpr std::array<ExperimentalFeatureDetails, 12> xpFeatureDetails = {{
|
|||
)",
|
||||
},
|
||||
{
|
||||
.tag = Xp::NixTesting,
|
||||
.name = "nix-testing",
|
||||
.tag = Xp::DaemonTrustOverride,
|
||||
.name = "daemon-trust-override",
|
||||
.description = R"(
|
||||
A "permanent" experimental feature for extra features we just need
|
||||
for testing. Not actually an "experiment" in the sense of being
|
||||
prospective functionality for regular users.
|
||||
Allow forcing trusting or not trusting clients with
|
||||
`nix-daemon`. This is useful for testing, but possibly also
|
||||
useful for various experiments with `nix-daemon --stdio`
|
||||
networking.
|
||||
)",
|
||||
},
|
||||
}};
|
||||
|
|
|
@ -28,7 +28,7 @@ enum struct ExperimentalFeature
|
|||
AutoAllocateUids,
|
||||
Cgroups,
|
||||
DiscardReferences,
|
||||
NixTesting,
|
||||
DaemonTrustOverride,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -472,13 +472,13 @@ static int main_nix_daemon(int argc, char * * argv)
|
|||
else if (*arg == "--stdio")
|
||||
stdio = true;
|
||||
else if (*arg == "--force-trusted") {
|
||||
experimentalFeatureSettings.require(Xp::NixTesting);
|
||||
experimentalFeatureSettings.require(Xp::DaemonTrustOverride);
|
||||
isTrustedOpt = Trusted;
|
||||
} else if (*arg == "--force-untrusted") {
|
||||
experimentalFeatureSettings.require(Xp::NixTesting);
|
||||
experimentalFeatureSettings.require(Xp::DaemonTrustOverride);
|
||||
isTrustedOpt = NotTrusted;
|
||||
} else if (*arg == "--default-trust") {
|
||||
experimentalFeatureSettings.require(Xp::NixTesting);
|
||||
experimentalFeatureSettings.require(Xp::DaemonTrustOverride);
|
||||
isTrustedOpt = std::nullopt;
|
||||
} else return false;
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue