7 // We don't have isolated unit tests for /status.json yet, but we do
8 // check (e.g., in pull_worker_test.go) that /status.json reports
9 // specific statistics correctly at the appropriate times.
11 // getStatusItem("foo","bar","baz") retrieves /status.json, decodes
12 // the response body into resp, and returns resp["foo"]["bar"]["baz"].
13 func getStatusItem(keys ...string) interface{} {
14 resp := IssueRequest(&RequestTester{"/status.json", "", "GET", nil})
16 json.NewDecoder(resp.Body).Decode(&s)
17 for _, k := range keys {
18 s = s.(map[string]interface{})[k]