test(#2591): assert hivectl header shows source, not a derived label
This commit is contained in:
parent
0ee4647d1e
commit
c7feeb7f5b
1 changed files with 8 additions and 6 deletions
|
|
@ -337,10 +337,12 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn render_dag_line_shows_chain_with_derived_label_and_state() {
|
fn render_dag_line_shows_source_and_chain() {
|
||||||
// Roll-up state (Running) + label ("rebuild") are derived from the node
|
// The header shows what the backend sends: the roll-up state glyph
|
||||||
// set — the wire no longer carries them. (`Done` nodes are included
|
// (derived — Running here) + the DAG `source` ("manual"); the operation
|
||||||
// here to exercise glyph rendering; production filters them off.)
|
// is read off the node chain, not a client-side label. (`Done` nodes
|
||||||
|
// are included here to exercise glyph rendering; production filters
|
||||||
|
// them off.)
|
||||||
let dag = DagView {
|
let dag = DagView {
|
||||||
id: 7,
|
id: 7,
|
||||||
source: Source::Manual,
|
source: Source::Manual,
|
||||||
|
|
@ -356,7 +358,7 @@ mod tests {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
let line = render_dag_line(&dag);
|
let line = render_dag_line(&dag);
|
||||||
assert!(line.starts_with("▶ rebuild alice"), "{line}");
|
assert!(line.starts_with("▶ manual alice"), "{line}");
|
||||||
assert!(
|
assert!(
|
||||||
line.contains("✔ prebuild → ✔ stop_for_update → ▶ swap → ⏸ reconcile"),
|
line.contains("✔ prebuild → ✔ stop_for_update → ▶ swap → ⏸ reconcile"),
|
||||||
"{line}"
|
"{line}"
|
||||||
|
|
@ -377,7 +379,7 @@ mod tests {
|
||||||
nodes: vec![failed],
|
nodes: vec![failed],
|
||||||
};
|
};
|
||||||
let line = render_dag_line(&dag);
|
let line = render_dag_line(&dag);
|
||||||
assert!(line.contains("✖ rebuild"), "{line}");
|
assert!(line.contains("✖ manual"), "{line}");
|
||||||
assert!(line.contains("— nix build exploded"), "{line}");
|
assert!(line.contains("— nix build exploded"), "{line}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue