e2e: fix handlers tests
Co-authored-by: leonnicolas <60091705+leonnicolas@users.noreply.github.com>
This commit is contained in:
parent
9cc5f05f8c
commit
4c0381b3aa
@ -9,7 +9,7 @@ setup_suite() {
|
||||
}
|
||||
|
||||
test_graph_handler() {
|
||||
assert "curl_pod http://10.4.0.1:1107/graph?format=svg&layout=circo | grep -q '<svg'" "graph handler should produce SVG output"
|
||||
assert "curl_pod 'http://10.4.0.1:1107/graph?format=svg&layout=circo' | grep -q '<svg'" "graph handler should produce SVG output"
|
||||
assert "curl_pod http://10.4.0.1:1107/graph?layout=circo | grep -q '<svg'" "graph handler should default to SVG output"
|
||||
assert "curl_pod http://10.4.0.1:1107/graph | grep -q '<svg'" "graph handler should default to SVG output"
|
||||
assert_fail "curl_pod http://10.4.0.1:1107/graph?layout=fake | grep -q '<svg'" "graph handler should reject invalid layout"
|
||||
@ -22,5 +22,5 @@ test_health_handler() {
|
||||
|
||||
test_metrics_handler() {
|
||||
assert "curl_pod http://10.4.0.1:1107/metrics" "metrics handler should return a status code of 200"
|
||||
assert "(( $(curl_pod http://10.4.0.1:1107/metrics | egrep ^kilo_nodes | cut -d " " -f 2) > 0 ))" "metrics handler should provide metric: kilo_nodes > 0"
|
||||
assert "(( $(curl_pod http://10.4.0.1:1107/metrics | grep -E ^kilo_nodes | cut -d " " -f 2) > 0 ))" "metrics handler should provide metric: kilo_nodes > 0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user