aboutsummaryrefslogtreecommitdiffstats
path: root/http/http_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'http/http_test.go')
-rw-r--r--http/http_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/http/http_test.go b/http/http_test.go
index 901903f..2909271 100644
--- a/http/http_test.go
+++ b/http/http_test.go
@@ -89,7 +89,7 @@ func TestRequests(t *testing.T) {
lr1 := `[{"time":"RFC3339","remote_addr":"127.0.0.254","hijacked":true,"type":"AAAA","question":"example.com.","answers":["2001:db8::1"]},` +
`{"time":"RFC3339","remote_addr":"127.0.0.42","hijacked":false,"type":"A","question":"example.com.","answers":["192.0.2.101","192.0.2.100"]}]`
lr2 := `[{"time":"RFC3339","remote_addr":"127.0.0.254","hijacked":true,"type":"AAAA","question":"example.com.","answers":["2001:db8::1"]}]`
- mr1 := `{"summary":{"since":"RFC3339","total":2,"hijacked":1},"requests":[{"time":"RFC3339","count":2}]}`
+ mr1 := `{"summary":{"log":{"since":"RFC3339","total":2,"hijacked":1},"cache":{"size":2,"capacity":10}},"requests":[{"time":"RFC3339","count":2}]}`
var tests = []struct {
method string
@@ -104,8 +104,8 @@ func TestRequests(t *testing.T) {
{http.MethodGet, "/cache/v1/", cr1, 200},
{http.MethodGet, "/cache/v1/?n=foo", cr1, 200},
{http.MethodGet, "/cache/v1/?n=1", cr2, 200},
- {http.MethodDelete, "/cache/v1/", `{"message":"Cleared cache."}`, 200},
{http.MethodGet, "/metric/v1/", mr1, 200},
+ {http.MethodDelete, "/cache/v1/", `{"message":"Cleared cache."}`, 200},
}
for i, tt := range tests {