mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Add GDSMetrics package
As per instructions https://github.com/alphagov/gds_metrics_python The celery workers don't have an HTTP endpoint so no point in trying to get prometheus to scrape them.
This commit is contained in:
@@ -6,7 +6,11 @@ def test_all_routes_have_authentication(client):
|
||||
blueprint_names = set(client.application.blueprints.keys())
|
||||
assert blueprint_names == before_req_funcs
|
||||
|
||||
routes_blueprint_names = set([x.split('.')[0] for x in client.application.view_functions.keys()])
|
||||
|
||||
# The static route is always available by default for a Flask app to serve anything in the static folder.
|
||||
routes_blueprint_names = set(
|
||||
[x.split('.')[0] for x in client.application.view_functions.keys() if x.split('.')[0] != 'static'])
|
||||
routes_blueprint_names.remove('static')
|
||||
|
||||
# The metrics route is not protected by auth as it's available to be scraped by Prometheus
|
||||
routes_blueprint_names.remove('metrics')
|
||||
assert sorted(blueprint_names) == sorted(routes_blueprint_names)
|
||||
|
||||
Reference in New Issue
Block a user