Skip to content

PatchWithEtag #59

Description

@mkrump

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    |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions