module-eval: assert every removed callout option fails in both namespaces
The removal case set 6 of the 10 option x namespace pairs. Build the pairs from one option table over both namespaces and check there are 10.
This commit is contained in:
parent
c10cc0e018
commit
c3ef18ad09
1 changed files with 22 additions and 8 deletions
|
|
@ -377,16 +377,30 @@ let
|
||||||
&& lib.hasInfix "services.hyperhive.${path}" a.message
|
&& lib.hasInfix "services.hyperhive.${path}" a.message
|
||||||
&& lib.hasInfix "live in the swarm secret store" a.message
|
&& lib.hasInfix "live in the swarm secret store" a.message
|
||||||
) m.assertions;
|
) m.assertions;
|
||||||
setting = {
|
removedOptions = {
|
||||||
"deploy.nats.autoGenerateCallout" = hive { deploy.nats.autoGenerateCallout = true; };
|
autoGenerateCallout = true;
|
||||||
"swarm.nats.autoGenerateCallout" = hive { swarm.nats.autoGenerateCallout = true; };
|
calloutUserPublicKey = "U";
|
||||||
"deploy.nats.calloutUserPublicKey" = hive { deploy.nats.calloutUserPublicKey = "U"; };
|
calloutIssuerPublicKey = "A";
|
||||||
"deploy.nats.calloutIssuerPublicKey" = hive { deploy.nats.calloutIssuerPublicKey = "A"; };
|
calloutUserSeedFile = "/run/u.seed";
|
||||||
"deploy.nats.calloutUserSeedFile" = hive { deploy.nats.calloutUserSeedFile = "/run/u.seed"; };
|
calloutIssuerSeedFile = "/run/i.seed";
|
||||||
"swarm.nats.calloutIssuerSeedFile" = hive { swarm.nats.calloutIssuerSeedFile = "/run/i.seed"; };
|
|
||||||
};
|
};
|
||||||
|
setting = lib.listToAttrs (
|
||||||
|
lib.concatMap
|
||||||
|
(
|
||||||
|
ns:
|
||||||
|
lib.mapAttrsToList (name: value: {
|
||||||
|
name = "${ns}.nats.${name}";
|
||||||
|
value = hive { ${ns}.nats.${name} = value; };
|
||||||
|
}) removedOptions
|
||||||
|
)
|
||||||
|
[
|
||||||
|
"deploy"
|
||||||
|
"swarm"
|
||||||
|
]
|
||||||
|
);
|
||||||
in
|
in
|
||||||
lib.all (path: refused setting.${path} path) (lib.attrNames setting)
|
lib.length (lib.attrNames setting) == 10
|
||||||
|
&& lib.all (path: refused setting.${path} path) (lib.attrNames setting)
|
||||||
&& !(lib.any (path: refused natsWithStoreIdentity path) (lib.attrNames setting));
|
&& !(lib.any (path: refused natsWithStoreIdentity path) (lib.attrNames setting));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue