Show the whole IP lookup answer, @meta included, on the home page (closes #201)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The home page's IP lookup card showed only the answer's `data` part, or only the message of an error answer. It now shows the whole answer, `@meta` included, as the IP information API card does. The server already added `@meta` to every JSON answer. A new table test requests every JSON route and checks `@meta` and its fields. It covers successes, the errors the handlers write, the router's 404 and 405, and the 500 and 504 the middleware writes. Model: opus-5-5
This commit is contained in:
@@ -77,6 +77,7 @@ const (
|
||||
prefixLengthPagePath = "/prefixlength/24"
|
||||
statusJSONPath = "/status.json"
|
||||
statsPath = "/api/v1/stats"
|
||||
healthCheckPath = "/.well-known/healthcheck.json"
|
||||
)
|
||||
|
||||
// The names the stats handler tests report the two stats handlers by.
|
||||
@@ -1109,7 +1110,7 @@ func TestJSONRoutesDoNotSendErrorDetails(t *testing.T) {
|
||||
path string
|
||||
wantCode int
|
||||
}{
|
||||
{"/.well-known/healthcheck.json", http.StatusServiceUnavailable},
|
||||
{healthCheckPath, http.StatusServiceUnavailable},
|
||||
{statusJSONPath, http.StatusInternalServerError},
|
||||
{statsPath, http.StatusInternalServerError},
|
||||
{asJSONPath, http.StatusInternalServerError},
|
||||
|
||||
Reference in New Issue
Block a user