@@ -1061,7 +1061,7 @@ describe('Sailor', () => {
1061
1061
let passthroughRequestStub ;
1062
1062
let runExecSpy ;
1063
1063
beforeEach ( async ( ) => {
1064
- const getObjectStub = sandbox . stub ( sailor . objectStorage , 'getAsJSON ' ) ;
1064
+ const getObjectStub = sandbox . stub ( sailor . objectStorage , 'getOne ' ) ;
1065
1065
bodyRequestStub = getObjectStub
1066
1066
. withArgs ( bodyObjectId , { jwtPayloadOrToken : settings . OBJECT_STORAGE_TOKEN } )
1067
1067
. resolves ( body ) ;
@@ -1142,7 +1142,7 @@ describe('Sailor', () => {
1142
1142
let passthroughRequestStub ;
1143
1143
let runExecSpy ;
1144
1144
beforeEach ( async ( ) => {
1145
- const getObjectStub = sandbox . stub ( sailor . objectStorage , 'getAsJSON ' ) ;
1145
+ const getObjectStub = sandbox . stub ( sailor . objectStorage , 'getOne ' ) ;
1146
1146
bodyRequestStub = getObjectStub
1147
1147
. withArgs ( bodyObjectId , { jwtPayloadOrToken : settings . OBJECT_STORAGE_TOKEN } )
1148
1148
. resolves ( body ) ;
@@ -1194,7 +1194,7 @@ describe('Sailor', () => {
1194
1194
runExecSpy = sandbox . spy ( sailor , 'runExec' ) ;
1195
1195
1196
1196
passthroughRequestStub = sandbox
1197
- . stub ( sailor . objectStorage , 'getAsJSON ' )
1197
+ . stub ( sailor . objectStorage , 'getOne ' )
1198
1198
. withArgs ( passthroughObjectId , { jwtPayloadOrToken : settings . OBJECT_STORAGE_TOKEN } )
1199
1199
. resolves ( passThroughBody ) ;
1200
1200
@@ -1309,7 +1309,7 @@ describe('Sailor', () => {
1309
1309
} ) ;
1310
1310
} ) ;
1311
1311
1312
- sandbox . stub ( sailor . objectStorage , 'getAsJSON ' )
1312
+ sandbox . stub ( sailor . objectStorage , 'getOne ' )
1313
1313
. withArgs ( passthroughObjectId , { jwtPayloadOrToken : settings . OBJECT_STORAGE_TOKEN } )
1314
1314
. resolves ( { passthrough : 'body' } ) ;
1315
1315
@@ -1322,7 +1322,7 @@ describe('Sailor', () => {
1322
1322
let bodyObjectId ;
1323
1323
beforeEach ( async ( ) => {
1324
1324
bodyObjectId = 'body-object-id' ;
1325
- addObjectStub = sandbox . stub ( sailor . objectStorage , 'addAsStream ' ) . resolves ( bodyObjectId ) ;
1325
+ addObjectStub = sandbox . stub ( sailor . objectStorage , 'add ' ) . resolves ( bodyObjectId ) ;
1326
1326
} ) ;
1327
1327
1328
1328
it ( 'should send lightweight' , async ( ) => {
@@ -1382,7 +1382,7 @@ describe('Sailor', () => {
1382
1382
describe ( 'and objects can not be uploaded successfully' , ( ) => {
1383
1383
let addObjectStub ;
1384
1384
beforeEach ( async ( ) => {
1385
- addObjectStub = sandbox . stub ( sailor . objectStorage , 'addAsStream ' ) . rejects ( new Error ( ) ) ;
1385
+ addObjectStub = sandbox . stub ( sailor . objectStorage , 'add ' ) . rejects ( new Error ( ) ) ;
1386
1386
} ) ;
1387
1387
1388
1388
it ( 'should not upload lightweight' , async ( ) => {
@@ -1416,7 +1416,7 @@ describe('Sailor', () => {
1416
1416
} ) ;
1417
1417
} ) ;
1418
1418
1419
- sandbox . stub ( sailor . objectStorage , 'getAsJSON ' )
1419
+ sandbox . stub ( sailor . objectStorage , 'getOne ' )
1420
1420
. withArgs ( passthroughObjectId , { jwtPayloadOrToken : settings . OBJECT_STORAGE_TOKEN } )
1421
1421
. resolves ( { passthrough : 'body' } ) ;
1422
1422
@@ -1427,7 +1427,7 @@ describe('Sailor', () => {
1427
1427
describe ( 'and all objects can be uploaded successfully' , ( ) => {
1428
1428
let addObjectSpy ;
1429
1429
beforeEach ( async ( ) => {
1430
- addObjectSpy = sandbox . spy ( sailor . objectStorage , 'addAsStream ' ) ;
1430
+ addObjectSpy = sandbox . spy ( sailor . objectStorage , 'add ' ) ;
1431
1431
} ) ;
1432
1432
1433
1433
it ( 'should not send lightweight' , async ( ) => {
0 commit comments