mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-14 06:46:56 +00:00
test(promql): read a tree line by the node it names
The composition test looked for a path prefix in front of the node name, which the bracketed tree no longer prints; the node name itself is the first word of every line. Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
@@ -5909,9 +5909,9 @@ async fn native_histogram_composition_query(
|
||||
assert!(
|
||||
descriptions.iter().any(|description| {
|
||||
description.lines().any(|line| {
|
||||
let mut words = line.split_whitespace();
|
||||
matches!(words.next(), Some("root" | "input" | "left" | "right"))
|
||||
&& words.next() == Some("Binary")
|
||||
// A tree line names its node first, so a `Binary` line is a binary node wherever it
|
||||
// sits in the tree.
|
||||
matches!(line.split_whitespace().next(), Some("Binary" | "Binary:"))
|
||||
})
|
||||
}),
|
||||
"`{query}` did not execute a native Binary: {descriptions:?}; response: {body}"
|
||||
|
||||
Reference in New Issue
Block a user