Skip to content

Commit

Permalink
Added a new test
Browse files Browse the repository at this point in the history
Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
  • Loading branch information
ADI-ROXX committed Jan 24, 2025
1 parent 1932a2b commit 48a1d6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Binary file added cmd/query/app/__debug_bin2510722341
Binary file not shown.
Binary file added cmd/query/app/__debug_bin889978186
Binary file not shown.
9 changes: 9 additions & 0 deletions cmd/query/app/http_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,15 @@ func TestTransformOTLPBadPayload(t *testing.T) {
}, querysvc.QueryServiceOptions{})
}

func TestBadOTLPReturns400(t *testing.T) {
withTestServer(t, func(ts *testServer) {
response := new(any)
request := "Bad Payload"
err := postJSON(ts.server.URL+"/api/transform", request, response)
require.ErrorContains(t, err, "400 error")
}, querysvc.QueryServiceOptions{})
}

func TestGetMetricsSuccess(t *testing.T) {
mr := &metricsmocks.Reader{}
apiHandlerOptions := []HandlerOption{
Expand Down

0 comments on commit 48a1d6f

Please sign in to comment.