@@ -21,7 +21,7 @@ const suffixMeta = '.meta'
2121const server = setupSupertestServer ( {
2222 live : true ,
2323 dataBrowserPath : 'default' ,
24- root : path . join ( __dirname , '../../test-esm/ resources' ) ,
24+ root : path . join ( __dirname , '../resources' ) ,
2525 auth : 'oidc' ,
2626 webid : false
2727} )
@@ -238,7 +238,7 @@ describe('HTTP APIs', function () {
238238 }
239239
240240 const size = fs . statSync ( path . join ( __dirname ,
241- '../../test-esm/ resources/sampleContainer/solid.png' ) ) . size
241+ '../resources/sampleContainer/solid.png' ) ) . size
242242 if ( res . body . length !== size ) {
243243 return done ( new Error ( 'files are not of the same size' ) )
244244 }
@@ -548,7 +548,7 @@ describe('HTTP APIs', function () {
548548
549549 describe ( 'PUT API' , function ( ) {
550550 const putRequestBody = fs . readFileSync ( path . join ( __dirname ,
551- '../../test-esm/ resources/sampleContainer/put1.ttl' ) , {
551+ '../resources/sampleContainer/put1.ttl' ) , {
552552 encoding : 'utf8'
553553 } )
554554 it ( 'should create new resource with if-none-match on non existing resource' , function ( done ) {
@@ -578,7 +578,7 @@ describe('HTTP APIs', function () {
578578 . expect ( 204 )
579579 . end ( function ( err ) {
580580 if ( err ) return done ( err )
581- if ( fs . existsSync ( path . join ( __dirname , '../../test-esm/ resources/put-resource-1.ttl$.txt' ) ) ) {
581+ if ( fs . existsSync ( path . join ( __dirname , '../resources/put-resource-1.ttl$.txt' ) ) ) {
582582 return done ( new Error ( 'Can read old file that should have been deleted' ) )
583583 }
584584 done ( )
@@ -830,11 +830,11 @@ describe('HTTP APIs', function () {
830830 } )
831831
832832 const postRequest1Body = fs . readFileSync ( path . join ( __dirname ,
833- '../../test-esm/ resources/sampleContainer/put1.ttl' ) , {
833+ '../resources/sampleContainer/put1.ttl' ) , {
834834 encoding : 'utf8'
835835 } )
836836 const postRequest2Body = fs . readFileSync ( path . join ( __dirname ,
837- '../../test-esm/ resources/sampleContainer/post2.ttl' ) , {
837+ '../resources/sampleContainer/post2.ttl' ) , {
838838 encoding : 'utf8'
839839 } )
840840 // Capture the resource name generated by server by parsing Location: header
@@ -874,7 +874,7 @@ describe('HTTP APIs', function () {
874874 try {
875875 postLocation = res . headers . location
876876 // console.log('location ' + postLocation)
877- const createdDir = fs . statSync ( path . join ( __dirname , '../../test-esm/ resources' , postLocation . slice ( 0 , - 1 ) ) )
877+ const createdDir = fs . statSync ( path . join ( __dirname , '../resources' , postLocation . slice ( 0 , - 1 ) ) )
878878 assert ( createdDir . isDirectory ( ) , 'Container should have been created' )
879879 } catch ( err ) {
880880 return done ( err )
@@ -987,7 +987,7 @@ describe('HTTP APIs', function () {
987987 try {
988988 postLocation = res . headers . location
989989 console . log ( 'location ' + postLocation )
990- const createdDir = fs . statSync ( path . join ( __dirname , '../../test-esm/ resources' , postLocation . slice ( 0 , - 1 ) ) )
990+ const createdDir = fs . statSync ( path . join ( __dirname , '../resources' , postLocation . slice ( 0 , - 1 ) ) )
991991 assert ( createdDir . isDirectory ( ) , 'Container should have been created' )
992992 } catch ( err ) {
993993 return done ( err )
@@ -1053,7 +1053,7 @@ describe('HTTP APIs', function () {
10531053 try {
10541054 assert . equal ( res . headers . location , expectedDirName ,
10551055 'Uri container names should be encoded' )
1056- const createdDir = fs . statSync ( path . join ( __dirname , '../../test-esm/ resources' , expectedDirName ) )
1056+ const createdDir = fs . statSync ( path . join ( __dirname , '../resources' , expectedDirName ) )
10571057 assert ( createdDir . isDirectory ( ) , 'Container should have been created' )
10581058 } catch ( err ) {
10591059 return done ( err )
@@ -1172,19 +1172,19 @@ describe('HTTP APIs', function () {
11721172 it ( 'should create as many files as the ones passed in multipart' ,
11731173 function ( done ) {
11741174 server . post ( '/sampleContainer/' )
1175- . attach ( 'timbl' , path . join ( __dirname , '../../test-esm/ resources/timbl.jpg' ) )
1176- . attach ( 'nicola' , path . join ( __dirname , '../../test-esm/ resources/nicola.jpg' ) )
1175+ . attach ( 'timbl' , path . join ( __dirname , '../resources/timbl.jpg' ) )
1176+ . attach ( 'nicola' , path . join ( __dirname , '../resources/nicola.jpg' ) )
11771177 . expect ( 200 )
11781178 . end ( function ( err ) {
11791179 if ( err ) return done ( err )
11801180
11811181 const sizeNicola = fs . statSync ( path . join ( __dirname ,
1182- '../../test-esm/ resources/nicola.jpg' ) ) . size
1183- const sizeTim = fs . statSync ( path . join ( __dirname , '../../test-esm/ resources/timbl.jpg' ) ) . size
1182+ '../resources/nicola.jpg' ) ) . size
1183+ const sizeTim = fs . statSync ( path . join ( __dirname , '../resources/timbl.jpg' ) ) . size
11841184 const sizeNicolaLocal = fs . statSync ( path . join ( __dirname ,
1185- '../../test-esm/ resources/sampleContainer/nicola.jpg' ) ) . size
1185+ '../resources/sampleContainer/nicola.jpg' ) ) . size
11861186 const sizeTimLocal = fs . statSync ( path . join ( __dirname ,
1187- '../../test-esm/ resources/sampleContainer/timbl.jpg' ) ) . size
1187+ '../resources/sampleContainer/timbl.jpg' ) ) . size
11881188
11891189 if ( sizeNicola === sizeNicolaLocal && sizeTim === sizeTimLocal ) {
11901190 return done ( )
0 commit comments