mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-03 18:52:04 +00:00
ae0f8be011
As seen in commits 33a4461fa ("BUG/MINOR: stats: Fix Lua's `get_stats` function") and a46b142e8 ("BUG/MINOR: Missing stat_field_names (since f21d17bb)") it seems frequent to omit to update stats_fields[] when adding a new ST_F_xxx entry. This breaks Lua's get_stats() and shows a "(null)" in the header of "show stat", but that one is not detectable to the naked eye anymore. Let's add a reminder above the enum declaration about this, and a small reg tests checking for the absence of "(null)". It was verified to fail before the last patch above.
15 lines
276 B
Plaintext
15 lines
276 B
Plaintext
varnishtest "Verifies the absence of (null) in 'show stats' header"
|
|
|
|
# This can happen if a new ST_F_xxx enum is added without updating
|
|
# stats_fields[].
|
|
|
|
feature ignore_unknown_macro
|
|
|
|
haproxy h1 -conf {
|
|
} -start
|
|
|
|
haproxy h1 -cli {
|
|
send "show stat"
|
|
expect !~ (null)
|
|
}
|