add status endpoint to '/'

paas were trying to ascertain if notify was up by looking at '/', for cert
renewal. This commit adds the status endpoint to '/', so we're not mistakenly
left for our cert to expire
This commit is contained in:
Leo Hemsted
2018-10-26 18:02:41 +01:00
parent ac5c19c3d5
commit 0d5f8cc7df
2 changed files with 4 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ from app import db, version
status = Blueprint('status', __name__)
@status.route('/', methods=['GET'])
@status.route('/_status', methods=['GET', 'POST'])
def show_status():
if request.args.get('simple', None):

View File

@@ -1,8 +1,9 @@
import pytest
from flask import json
def test_get_status_all_ok(client):
path = '/_status'
@pytest.mark.parametrize('path', ['/', '/_status'])
def test_get_status_all_ok(client, notify_db_session, path):
response = client.get(path)
assert response.status_code == 200
resp_json = json.loads(response.get_data(as_text=True))