Skip to content

Commit

Permalink
maester-client updated (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
danylo-felekevchuk-elasticio authored Mar 22, 2024
1 parent 0621814 commit d9bb46b
Show file tree
Hide file tree
Showing 5 changed files with 4,933 additions and 3,901 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.7.2 (March 22, 2024)

* @elastic.io/maester-client updated to 5.0.2 ([#206](https://github.com/elasticio/sailor-nodejs/issues/206))

## 2.7.1 (October 20, 2022)

* Replaced `object-storage-client` with `maester-client`

## 2.7.0 (September 15, 2022)

* Add AMQP_PERSISTENT_MESSAGES configuration env var to enable persistent delivery mode.
Expand Down Expand Up @@ -142,3 +150,4 @@
## 2.3.0 (October 19, 2018)

* Sailor now handles RabbitMQ disconnects correctly

2 changes: 1 addition & 1 deletion lib/sailor.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class Sailor {
logger.info('Successfully obtained message body.', { objectId });
logger.trace('Message body object received');

return object;
return object.data;
}

uploadMessageBody(bodyBuf) {
Expand Down
20 changes: 12 additions & 8 deletions mocha_spec/unit/sailor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -971,10 +971,14 @@ describe('Sailor', () => {
bodyObjectId = 'body-object-id';
passthroughObjectId = 'passthrough-object-id';
body = {
some: 'body'
data: {
some: 'body'
}
};
passThroughBody = {
passThrough: 'body'
data: {
some: 'body'
}
};
payload = {
headers: {
Expand Down Expand Up @@ -1084,8 +1088,8 @@ describe('Sailor', () => {
runExecSpy,
sinon.match.object,
sinon.match
.hasNested('body', body)
.and(sinon.match.hasNested('passthrough.step_4.body', passThroughBody)),
.hasNested('body', body.data)
.and(sinon.match.hasNested('passthrough.step_4.body', passThroughBody.data)),
message,
sinon.match.object,
sinon.match.object,
Expand All @@ -1112,7 +1116,7 @@ describe('Sailor', () => {
headers: {
[Sailor.OBJECT_ID_HEADER]: passthroughObjectId
},
body: passThroughBody
body: passThroughBody.data
}
}
},
Expand Down Expand Up @@ -1239,7 +1243,7 @@ describe('Sailor', () => {
headers: {
[Sailor.OBJECT_ID_HEADER]: passthroughObjectId
},
body: passThroughBody
body: passThroughBody.data
}
}
},
Expand Down Expand Up @@ -1311,7 +1315,7 @@ describe('Sailor', () => {

sandbox.stub(sailor.objectStorage, 'getOne')
.withArgs(passthroughObjectId, { jwtPayloadOrToken: settings.OBJECT_STORAGE_TOKEN })
.resolves({ passthrough: 'body' });
.resolves({ data: { passthrough: 'body' } });

await sailor.connect();
await sailor.prepare();
Expand Down Expand Up @@ -1418,7 +1422,7 @@ describe('Sailor', () => {

sandbox.stub(sailor.objectStorage, 'getOne')
.withArgs(passthroughObjectId, { jwtPayloadOrToken: settings.OBJECT_STORAGE_TOKEN })
.resolves({ passthrough: 'body' });
.resolves({ data: { passthrough: 'body' } });

await sailor.connect();
await sailor.prepare();
Expand Down
Loading

0 comments on commit d9bb46b

Please sign in to comment.