@@ -1006,7 +1006,7 @@ describe('cache-control tests', () => {
10061006 assert . equal ( request7 . text , '' ) ;
10071007 } ) ;
10081008
1009- test ( 'block at -time cache control' , async ( ) => {
1009+ test ( 'block by-block -time cache control' , async ( ) => {
10101010 const blockTime1 = 1700000000 ;
10111011 const blockTime2 = 1700001000 ;
10121012
@@ -1031,7 +1031,7 @@ describe('cache-control tests', () => {
10311031
10321032 // Valid ETag for timestamp query.
10331033 const request1 = await supertest ( api . server ) . get (
1034- `/extended/v2/blocks/at -time/${ blockTime2 } `
1034+ `/extended/v2/blocks/by-block -time/${ blockTime2 } `
10351035 ) ;
10361036 assert . equal ( request1 . status , 200 ) ;
10371037 assert . equal ( request1 . type , 'application/json' ) ;
@@ -1041,21 +1041,21 @@ describe('cache-control tests', () => {
10411041
10421042 // Cache works with valid ETag.
10431043 const request2 = await supertest ( api . server )
1044- . get ( `/extended/v2/blocks/at -time/${ blockTime2 } ` )
1044+ . get ( `/extended/v2/blocks/by-block -time/${ blockTime2 } ` )
10451045 . set ( 'If-None-Match' , etag0 ) ;
10461046 assert . equal ( request2 . status , 304 ) ;
10471047 assert . equal ( request2 . text , '' ) ;
10481048
10491049 // Cache miss with wrong ETag.
10501050 const request3 = await supertest ( api . server )
1051- . get ( `/extended/v2/blocks/at -time/${ blockTime2 } ` )
1051+ . get ( `/extended/v2/blocks/by-block -time/${ blockTime2 } ` )
10521052 . set ( 'If-None-Match' , '"0x12345678"' ) ;
10531053 assert . equal ( request3 . status , 200 ) ;
10541054 assert . equal ( request3 . headers [ 'etag' ] , etag0 ) ;
10551055
10561056 // Timestamp between blocks returns earlier block with different ETag.
10571057 const request4 = await supertest ( api . server ) . get (
1058- `/extended/v2/blocks/at -time/${ blockTime1 + 500 } `
1058+ `/extended/v2/blocks/by-block -time/${ blockTime1 + 500 } `
10591059 ) ;
10601060 assert . equal ( request4 . status , 200 ) ;
10611061 assert . equal ( request4 . body . height , 1 ) ;
@@ -1064,7 +1064,7 @@ describe('cache-control tests', () => {
10641064
10651065 // Cache works for earlier block timestamp.
10661066 const request5 = await supertest ( api . server )
1067- . get ( `/extended/v2/blocks/at -time/${ blockTime1 + 500 } ` )
1067+ . get ( `/extended/v2/blocks/by-block -time/${ blockTime1 + 500 } ` )
10681068 . set ( 'If-None-Match' , etag1 ) ;
10691069 assert . equal ( request5 . status , 304 ) ;
10701070 assert . equal ( request5 . text , '' ) ;
@@ -1091,15 +1091,15 @@ describe('cache-control tests', () => {
10911091
10921092 // Old ETag is now a miss after re-org.
10931093 const request6 = await supertest ( api . server )
1094- . get ( `/extended/v2/blocks/at -time/${ blockTime2 } ` )
1094+ . get ( `/extended/v2/blocks/by-block -time/${ blockTime2 } ` )
10951095 . set ( 'If-None-Match' , etag0 ) ;
10961096 assert . equal ( request6 . status , 200 ) ;
10971097 assert . notEqual ( request6 . headers [ 'etag' ] , etag0 ) ;
10981098 const etag2 = request6 . headers [ 'etag' ] ;
10991099
11001100 // Cache works with new ETag.
11011101 const request7 = await supertest ( api . server )
1102- . get ( `/extended/v2/blocks/at -time/${ blockTime2 } ` )
1102+ . get ( `/extended/v2/blocks/by-block -time/${ blockTime2 } ` )
11031103 . set ( 'If-None-Match' , etag2 ) ;
11041104 assert . equal ( request7 . status , 304 ) ;
11051105 assert . equal ( request7 . text , '' ) ;
0 commit comments