Chore: Query endpoint refactor (#41637)

Get rid of using legacydata.RequestHandler in HTTPServer, /api/tsdb/query and pkg/expr 
with the goal of deprecating /api/tsdb/query and remove it completely eventually. This is 
the first step of cleaning up the HTTP API query endpoint.

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
This commit is contained in:
Marcus Efraimsson
2021-11-29 14:21:54 +01:00
committed by GitHub
co-authored by Alexander Emelin
parent 6e8cc426d6
commit 8927a3ca20
10 changed files with 242 additions and 316 deletions
+12
View File
@@ -88,8 +88,20 @@ func TestToCamelCase(t *testing.T) {
"snake_case_string": "snakeCaseString",
"mixed-case_string": "mixedCaseString",
"alreadyCamelCase": "alreadyCamelCase",
"": "",
}
for input, expected := range tests {
assert.Equal(t, expected, ToCamelCase(input))
}
}
func TestCapitalize(t *testing.T) {
tests := map[string]string{
"properly capitalizes": "Properly capitalizes",
"Already capitalized": "Already capitalized",
"": "",
}
for input, expected := range tests {
assert.Equal(t, expected, Capitalize(input))
}
}