lib/protoparser/prometheus: add a test for cassandra-exporter

Thanks to Seva
This commit is contained in:
Aliaksandr Valialkin 2020-07-27 18:37:08 +03:00
parent cb8c6908dc
commit 865610a7c8

View file

@ -180,6 +180,20 @@ func TestRowsUnmarshalSuccess(t *testing.T) {
Timestamp: 789,
}},
})
f(`# _ _
# ___ __ _ ___ ___ __ _ _ __ __| |_ __ __ _ _____ ___ __ ___ _ __| |_ ___ _ __
`+"# / __/ _` / __/ __|/ _` | '_ \\ / _` | '__/ _` |_____ / _ \\ \\/ / '_ \\ / _ \\| '__| __/ _ \\ '__|\n"+`
# | (_| (_| \__ \__ \ (_| | | | | (_| | | | (_| |_____| __/> <| |_) | (_) | | | || __/ |
# \___\__,_|___/___/\__,_|_| |_|\__,_|_| \__,_| \___/_/\_\ .__/ \___/|_| \__\___|_|
# |_|
#
# TYPE cassandra_token_ownership_ratio gauge
cassandra_token_ownership_ratio 78.9`, &Rows{
Rows: []Row{{
Metric: "cassandra_token_ownership_ratio",
Value: 78.9,
}},
})
// Timestamp bigger than 1<<31
f("aaa 1123 429496729600", &Rows{