@@ -311,7 +311,7 @@ Feature: Metrics
311
311
Given a valid "appKeyAuth" key in the system
312
312
And operation "QueryScalarData" enabled
313
313
And new "QueryScalarData" request
314
- And body with value {"data" : {"attributes" : {"formulas" : [{"formula" : "a" , "limit" : {"count" : 10, "order" : "desc" }}], "from" : 1671612804000 , "queries" : [{"aggregator" : "avg" , "data_source" : "metrics" , "query" : "avg:system.cpu.user{*}" , "name" : "a" }], "to" : 1671620004000 }, "type" : "scalar_request" }}
314
+ And body with value {"data" : {"attributes" : {"formulas" : [{"formula" : "a" , "limit" : {"count" : 10, "order" : "desc" }}], "from" : {{ timestamp( 'now - 1h' ) }}000 , "queries" : [{"aggregator" : "avg" , "data_source" : "metrics" , "query" : "avg:system.cpu.user{*}" , "name" : "a" }], "to" : {{ timestamp( 'now' ) }}000 }, "type" : "scalar_request" }}
315
315
When the request is sent
316
316
Then the response status is 200 OK
317
317
And the response "data.type" is equal to "scalar_response"
@@ -385,7 +385,7 @@ Feature: Metrics
385
385
Given a valid "appKeyAuth" key in the system
386
386
And operation "QueryTimeseriesData" enabled
387
387
And new "QueryTimeseriesData" request
388
- And body with value {"data" : {"attributes" : {"formulas" : [{"formula" : "a" , "limit" : {"count" : 10, "order" : "desc" }}], "from" : 1671612804000 , "interval" : 5000, "queries" : [{"data_source" : "metrics" , "query" : "avg:system.cpu.user{*}" , "name" : "a" }], "to" : 1671620004000 }, "type" : "timeseries_request" }}
388
+ And body with value {"data" : {"attributes" : {"formulas" : [{"formula" : "a" , "limit" : {"count" : 10, "order" : "desc" }}], "from" : {{ timestamp( 'now - 1h' ) }}000 , "interval" : 5000, "queries" : [{"data_source" : "metrics" , "query" : "avg:system.cpu.user{*}" , "name" : "a" }], "to" : {{ timestamp( 'now' ) }}000 }, "type" : "timeseries_request" }}
389
389
When the request is sent
390
390
Then the response status is 200 OK
391
391
And the response "data.type" is equal to "timeseries_response"
0 commit comments