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:
co-authored by
Alexander Emelin
parent
6e8cc426d6
commit
8927a3ca20
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user