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

PatchWithEtag #59

Open
mkrump opened this issue Aug 2, 2017 · 0 comments
Open

PatchWithEtag #59

mkrump opened this issue Aug 2, 2017 · 0 comments

Comments

@mkrump
Copy link

mkrump commented Aug 2, 2017

Does it make sense to update this test (maybe like + section below), to include a failed update attempt when the ETag does not match? It seemed like right now, it could pass w/o checking the ETag.

 |script  |http browser                            |
 |set host|localhost                               |
 |set port|5000                                    |
 |get     |/patch-content.txt                      |
 |ensure  |response code equals|200                |
 |ensure  |body has content    |default content    |
 |set data|patched content                         |
 |set etag|dc50a0d27dda2eee9f65644cd7e4c9cf11de8bec| * sha1 of "default content"
 |patch   |/patch-content.txt                      |
 |ensure  |response code equals|204                |
 |get     |/patch-content.txt                      |
 |ensure  |response code equals|200                |
 |ensure  |body has content    |patched content    |

# Maybe add test for ETag that doesn't match.
+|set data|patched content                         |
+|set etag|dc50a0d27dda2eee9f65644cd7e4c9cf11de8bec| * sha1 of "default content"
+|patch   |/patch-content.txt                      |
+|ensure  |response code equals|412                |

 |set data|default content                         |
 |set etag|5c36acad75b78b82be6d9cbbd6143ab7e0cc04b0| * sha1 of "patched content"
 |patch   |/patch-content.txt                      |
 |get     |/patch-content.txt                      |
 |ensure  |body has content    |default content    |
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

No branches or pull requests

1 participant