@@ -53,15 +53,12 @@ export default function ({ getService }) {
5353 } ) ;
5454
5555 it ( 'should pull local stats and validate data types' , async ( ) => {
56- const timeRange = {
57- min : '2018-07-23T22:07:00Z' ,
58- max : '2018-07-23T22:13:00Z' ,
59- } ;
56+ const timestamp = '2018-07-23T22:13:00Z' ;
6057
6158 const { body } = await supertest
6259 . post ( '/api/telemetry/v2/clusters/_stats' )
6360 . set ( 'kbn-xsrf' , 'xxx' )
64- . send ( { timeRange , unencrypted : true } )
61+ . send ( { timestamp , unencrypted : true } )
6562 . expect ( 200 ) ;
6663
6764 expect ( body . length ) . to . be ( 1 ) ;
@@ -98,15 +95,12 @@ export default function ({ getService }) {
9895 } ) ;
9996
10097 it ( 'should pull local stats and validate fields' , async ( ) => {
101- const timeRange = {
102- min : '2018-07-23T22:07:00Z' ,
103- max : '2018-07-23T22:13:00Z' ,
104- } ;
98+ const timestamp = '2018-07-23T22:13:00Z' ;
10599
106100 const { body } = await supertest
107101 . post ( '/api/telemetry/v2/clusters/_stats' )
108102 . set ( 'kbn-xsrf' , 'xxx' )
109- . send ( { timeRange , unencrypted : true } )
103+ . send ( { timestamp , unencrypted : true } )
110104 . expect ( 200 ) ;
111105
112106 const stats = body [ 0 ] ;
@@ -156,10 +150,7 @@ export default function ({ getService }) {
156150 } ) ;
157151
158152 describe ( 'application usage limits' , ( ) => {
159- const timeRange = {
160- min : '2018-07-23T22:07:00Z' ,
161- max : '2018-07-23T22:13:00Z' ,
162- } ;
153+ const timestamp = '2018-07-23T22:13:00Z' ;
163154
164155 function createSavedObject ( ) {
165156 return supertest
@@ -191,7 +182,7 @@ export default function ({ getService }) {
191182 const { body } = await supertest
192183 . post ( '/api/telemetry/v2/clusters/_stats' )
193184 . set ( 'kbn-xsrf' , 'xxx' )
194- . send ( { timeRange , unencrypted : true } )
185+ . send ( { timestamp , unencrypted : true } )
195186 . expect ( 200 ) ;
196187
197188 expect ( body . length ) . to . be ( 1 ) ;
@@ -242,7 +233,7 @@ export default function ({ getService }) {
242233 const { body } = await supertest
243234 . post ( '/api/telemetry/v2/clusters/_stats' )
244235 . set ( 'kbn-xsrf' , 'xxx' )
245- . send ( { timeRange , unencrypted : true } )
236+ . send ( { timestamp , unencrypted : true } )
246237 . expect ( 200 ) ;
247238
248239 expect ( body . length ) . to . be ( 1 ) ;
0 commit comments