mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
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:
@@ -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):
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user