Sync: test JS server 404 for GET on missing WBO

RESOLVED FIXED in mozilla10

Status

Cloud Services
Firefox Sync: Backend
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: rnewman, Assigned: rnewman)

Tracking

unspecified
mozilla10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed in services][qa-])

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
There was a case where a 404 for a WBO in a non-existent collection would return 200. Here's a patch.
(Assignee)

Comment 1

7 years ago
Created attachment 567179 [details] [diff] [review]
Proposed patch. v1
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Attachment #567179 - Flags: review?(philipp)
Comment on attachment 567179 [details] [diff] [review]
Proposed patch. v1

>       switch (req.method) {
>         case "GET":
>           if (!coll) {
>+            if (wboID) {
>+              respond(404, "Not found", "Not found");
>+              return;
>+            }
>             // *cries inside*: Bug 687299.
>             respond(200, "OK", "[]");

You and me, brother.


>+  function getMissingCollectionWBO(next) {
>+    _("Testing that fetching a WBO from an on-existent collection 404s.");
>+    let req = localRequest(storageURL + "/foobar/baz");
>+    req.get(function (err) {
>+      do_check_eq(this.response.status, 404);
>+      Utils.nextTick(next);
>+    });
>+  }
>+
>+  s.start(8080,

(sigh @ one letter variable name)

r=me
Attachment #567179 - Flags: review?(philipp) → review+
(Assignee)

Comment 4

7 years ago
https://hg.mozilla.org/mozilla-central/rev/9c072e3fa138
https://hg.mozilla.org/mozilla-central/rev/8c1ad90b6804
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.