Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve http tests #47

Closed
wants to merge 2 commits into from
Closed

Conversation

aenario
Copy link
Contributor

@aenario aenario commented Oct 13, 2016

This add a lot of test on HTTP Update & Delete, and fix a few bug.

It reverts the proposal in API documentation to have the deletion works without revision provided, as it would force to make two couchdb request for every stack request.

This behaviour could later be reintroduced with a ?force=true query parameter.

- If none is passed, the document will be force-deleted.

**Why shouldn't you force delete** (contrieved example) the user is syncing contacts from his mobile, a contact is created with name but no number, the user see it in the contact app. In parallel, the number is added by sync and the user click "delete" because a contact with no number is useless. The decision to delete is based on outdated data state and should therefore be aborted.
Couchdb will prevent this, the stack API allow it for fast prototyping but it should be avoided for serious applications.
Copy link
Contributor

Choose a reason for hiding this comment

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

why delete this paragraph ?

@jinroh
Copy link
Contributor

jinroh commented Oct 14, 2016

Added few comments but LGTM overall.

@jinroh
Copy link
Contributor

jinroh commented Oct 14, 2016

Rebased and merged 5e3180b

@jinroh jinroh closed this Oct 14, 2016
@aenario aenario deleted the improve-http-tests branch October 14, 2016 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants