Skip to content

Conversation

Yoann-Abbes
Copy link
Contributor

What does this PR do?

This PR adds a source option. Set to true returns the updated document in a _source object.

Depends to kuzzleio/kuzzle#1549

How should this be manually tested?

Run Kuzzle within this branch kuzzleio/kuzzle#1549

document.update(index, collection, body, {source: true})

Other changes

Boyscout

@codecov
Copy link

codecov bot commented Jan 9, 2020

Codecov Report

Merging #479 into 7-dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            7-dev     #479      +/-   ##
==========================================
+ Coverage   95.99%   95.99%   +<.01%     
==========================================
  Files          32       32              
  Lines        1298     1299       +1     
==========================================
+ Hits         1246     1247       +1     
  Misses         52       52
Impacted Files Coverage Δ
src/controllers/document.js 95.23% <100%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbef509...f5cb94b. Read the comment docs.

Copy link
Member

@alexandrebouthinon alexandrebouthinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM but missing a new end to end test to cover this use case

@Yoann-Abbes
Copy link
Contributor Author

LGTM but missing a new end to end test to cover this use case

Functional test are in Kuzzle (which use the SDK)

@Aschen
Copy link
Contributor

Aschen commented Jan 9, 2020

IMHO, unit tests are enough for a small improvement like this

Copy link
Member

@alexandrebouthinon alexandrebouthinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok 🙂

@Yoann-Abbes Yoann-Abbes merged commit c8c43b7 into 7-dev Jan 10, 2020
@Yoann-Abbes Yoann-Abbes deleted the add-source-update-option branch January 10, 2020 13:40
@Yoann-Abbes Yoann-Abbes mentioned this pull request Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants