Verified Commit 9991588f authored by Ulrich Wisser's avatar Ulrich Wisser Committed by Petr Špaček

added tests for new web apis

added new global bogus_log
parent badb94df
......@@ -53,6 +53,7 @@ new_globals = {
'stats',
'http',
'trust_anchors',
'bogus_log',
}
-- Luacheck < 0.18 doesn't support new_read_globals
......
......@@ -58,6 +58,16 @@ else
same(code, 200, '/metrics page return 200 OK')
ok(#body > 0, '/metrics page has non-empty body')
same(mime, 'text/plain; version=0.0.4', '/metrics page has correct content type')
-- /metrics serves frequent
code, body, mime = http_get(uri .. '/frequent')
same(code, 200, '/frequent page return 200 OK')
ok(#body > 0, '/frequent page has non-empty body')
same(mime, 'text/plain; version=0.0.4', '/frequent page has correct content type')
-- /metrics serves bogus
code, body, mime = http_get(uri .. '/bogus')
same(code, 200, '/bogus page return 200 OK')
ok(#body > 0, '/bogus page has non-empty body')
same(mime, 'text/plain; version=0.0.4', '/bogus page has correct content type')
-- /trace serves trace log for requests
code, body, mime = http_get(uri .. '/trace/localhost/A')
same(code, 200, '/trace page return 200 OK')
......@@ -76,4 +86,4 @@ else
}
return tests
end
\ No newline at end of file
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment