Skip to content

Commit

Permalink
Revert, arrays now handled by upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeatolo committed Sep 12, 2023
1 parent 2df81aa commit b7c38a7
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions pkg/collector/httpmetrics/json_path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,19 @@ func TestJSONPathMetricsGetter(t *testing.T) {
err error
}{
{
name: "basic single value on object attribute",
name: "basic single value",
jsonResponse: []byte(`{"value":3}`),
jsonPath: "$.value",
result: 3,
aggregator: Average,
},
{
name: "basic average on object attribute",
name: "basic average",
jsonResponse: []byte(`{"value":[3,4,5]}`),
jsonPath: "$.value",
result: 4,
aggregator: Average,
},
{
name: "basic average on simple array",
jsonResponse: []byte(`[3,4,5]`),
jsonPath: "$",
result: 4,
aggregator: Average,
},
{
name: "basic average on nested array",
jsonResponse: []byte(`[[3, 1235467890], [4, 1234567891], [5, 1234567892]]`),
jsonPath: "$[:][0]",
result: 4,
aggregator: Average,
},
{
name: "dotted key",
jsonResponse: []byte(`{"metric.value":5}`),
Expand Down

0 comments on commit b7c38a7

Please sign in to comment.