add should comments to assertions
This commit is contained in:
		| @@ -9,16 +9,18 @@ setup_suite() { | ||||
| } | ||||
|  | ||||
| test_graph_handler() { | ||||
|     assert "curl_pod http://10.4.0.1:1107/graph?format=svg&layout=circo | grep -q '<svg'" | ||||
|     assert "curl_pod http://10.4.0.1:1107/graph?layout=circo | grep -q '<svg'" | ||||
|     assert "curl_pod http://10.4.0.1:1107/graph | grep -q '<svg'" | ||||
|     assert _not "curl_pod http://10.4.0.1:1107/graph?format=svg&layout=fake | grep -q '<svg'" | ||||
|     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 _not "curl_pod http://10.4.0.1:1107/graph?layout=fake | grep -q '<svg'" "graph handler should reject invalid layout" | ||||
|     assert _not "curl_pod http://10.4.0.1:1107/graph?format=fake | grep -q '<svg'" "graph handler should reject invalid format" | ||||
| } | ||||
|  | ||||
| test_health_handler() { | ||||
|     assert "curl_pod http://10.4.0.1:1107/health" | ||||
|     assert "curl_pod http://10.4.0.1:1107/health" "health handler should return a status code of 200" | ||||
| } | ||||
|  | ||||
| test_metrics_handler() { | ||||
|     assert "curl_pod http://10.4.0.1:1107/metrics" | ||||
|     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" | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user