6260: Add explanatory comment about testing /status.json.
authorTom Clegg <tom@curoverse.com>
Tue, 11 Aug 2015 15:13:34 +0000 (11:13 -0400)
committerTom Clegg <tom@curoverse.com>
Tue, 11 Aug 2015 15:13:34 +0000 (11:13 -0400)
services/keepstore/status_test.go

index 134b016625dc58de3e3cf934f909915658c500a3..74de61e72ff7c1a1dbba72472d0c1f3238120edf 100644 (file)
@@ -4,6 +4,12 @@ import (
        "encoding/json"
 )
 
+// We don't have isolated unit tests for /status.json yet, but we do
+// check (e.g., in pull_worker_test.go) that /status.json reports
+// specific statistics correctly at the appropriate times.
+
+// getStatusItem("foo","bar","baz") retrieves /status.json, decodes
+// the response body into resp, and returns resp["foo"]["bar"]["baz"].
 func getStatusItem(keys ...string) interface{} {
        resp := IssueRequest(&RequestTester{"/status.json", "", "GET", nil})
        var s interface{}