@@ -13,6 +13,10 @@ const { scaledMsPerDay } = config.getTimeOptions();
1313const log = new DummyRequestLogger ( ) ;
1414const oneDay = 24 * 60 * 60 * 1000 ;
1515
16+ const {
17+ LOCATION_NAME_DMF ,
18+ } = require ( '../../../constants' ) ;
19+
1620describe ( 'cold storage' , ( ) => {
1721 describe ( 'validatePutVersionId' , ( ) => {
1822 [
@@ -42,14 +46,14 @@ describe('cold storage', () => {
4246 {
4347 description : 'should return InvalidObjectState if object is not archived' ,
4448 objMD : {
45- dataStoreName : 'location-dmf-v1' ,
49+ dataStoreName : LOCATION_NAME_DMF ,
4650 } ,
4751 expectedRes : errors . InvalidObjectState ,
4852 } ,
4953 {
5054 description : 'should return InvalidObjectState if object is already restored' ,
5155 objMD : {
52- dataStoreName : 'location-dmf-v1' ,
56+ dataStoreName : LOCATION_NAME_DMF ,
5357 archive : {
5458 restoreRequestedAt : new Date ( 0 ) ,
5559 restoreRequestedDays : 5 ,
@@ -62,7 +66,7 @@ describe('cold storage', () => {
6266 {
6367 description : 'should pass if object archived' ,
6468 objMD : {
65- dataStoreName : 'location-dmf-v1' ,
69+ dataStoreName : LOCATION_NAME_DMF ,
6670 archive : {
6771 restoreRequestedAt : new Date ( 0 ) ,
6872 restoreRequestedDays : 5 ,
@@ -141,7 +145,7 @@ describe('cold storage', () => {
141145
142146 it ( 'should fail when object is being restored' , done => {
143147 const objectMd = new ObjectMD ( ) . setDataStoreName (
144- 'location-dmf-v1'
148+ LOCATION_NAME_DMF
145149 ) . setArchive ( new ObjectMDArchive (
146150 {
147151 archiveId : '97a71dfe-49c1-4cca-840a-69199e0b0322' ,
@@ -159,7 +163,7 @@ describe('cold storage', () => {
159163
160164 it ( 'should fail when restored object is expired' , done => {
161165 const objectMd = new ObjectMD ( ) . setDataStoreName (
162- 'location-dmf-v1'
166+ LOCATION_NAME_DMF
163167 ) . setArchive ( new ObjectMDArchive (
164168 {
165169 archiveId : '97a71dfe-49c1-4cca-840a-69199e0b0322' ,
@@ -179,7 +183,7 @@ describe('cold storage', () => {
179183
180184 it ( 'should succeed for cold object' , done => {
181185 const objectMd = new ObjectMD ( ) . setDataStoreName (
182- 'location-dmf-v1'
186+ LOCATION_NAME_DMF
183187 ) . setArchive ( new ObjectMDArchive ( {
184188 archiveId : '97a71dfe-49c1-4cca-840a-69199e0b0322' ,
185189 archiveVersion : 5577006791947779 ,
@@ -204,7 +208,7 @@ describe('cold storage', () => {
204208
205209 it ( 'should succeed for restored object' , done => {
206210 const objectMd = new ObjectMD ( ) . setDataStoreName (
207- 'location-dmf-v1'
211+ LOCATION_NAME_DMF
208212 ) . setArchive ( new ObjectMDArchive (
209213 {
210214 archiveId : '97a71dfe-49c1-4cca-840a-69199e0b0322' ,
@@ -246,7 +250,7 @@ describe('cold storage', () => {
246250
247251 it ( 'should fail if _updateRestoreInfo fails' , done => {
248252 const objectMd = new ObjectMD ( ) . setDataStoreName (
249- 'location-dmf-v1'
253+ LOCATION_NAME_DMF
250254 ) . setArchive ( false ) . getValue ( ) ;
251255
252256 startRestore ( objectMd , { days : 7 } , log , err => {
0 commit comments