module-eval: assert the severity table once, not once per tier
Both journald receivers import one PRIORITY mapping, and each tier's suite was asserting the whole table against its own receiver. That checks one file twice: invert the table and two cases fail saying the same thing, which tells you nothing about which of the two possible defects you have. Split by subject instead. The table's contents — the inverted direction, overwrite_text, parse_from/on_error — belong to the file that holds them, so they get a suite of their own reading that file directly, with no fixture at all. Each tier keeps a case, reduced to the question only it can answer: does MY receiver carry the shared mapping. Both tier cases stay. They cover different receivers over different journals — the agent container's own and the swarm collector's host journal — and one tier quietly losing its parser while the other keeps one is exactly the half-fixed state worth catching. Membership rather than equality of the whole operator list, so a tier that later grows an unrelated operator of its own still passes. Checked against seven defect scenarios: each fails exactly one case, and names the right one.
This commit is contained in:
parent
7fa13b592f
commit
33a7ca6118
5 changed files with 174 additions and 88 deletions
|
|
@ -91,6 +91,15 @@ in
|
|||
inherit pkgs self nixosSystem;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
# Not a subsystem cluster like its siblings but a single shared file, and
|
||||
# its own derivation for that reason: both journald receivers import one
|
||||
# PRIORITY → severity mapping, so asserting the table inside each tier's
|
||||
# suite would check one file twice and report one defect as two failures.
|
||||
# Holds no fixture, so it costs nothing next to the clusters.
|
||||
module-eval-journald-severity = import ./module-eval/journald-severity.nix {
|
||||
inherit pkgs self nixosSystem;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
module-eval-agent-queue-bao = import ./module-eval/agent-queue-bao.nix {
|
||||
inherit pkgs self nixosSystem;
|
||||
inherit (pkgs) lib;
|
||||
|
|
|
|||
Loading…
Reference in a new issue