Compare commits
No commits in common. "f39d319b25f5197859b06947d27e27e563aaafd6" and "969ba0f64c68f4f1249b524696c74c7a34498ec1" have entirely different histories.
f39d319b25
...
969ba0f64c
@ -42,15 +42,6 @@ def create_app():
|
|||||||
check_password_hash(users.get(username), password):
|
check_password_hash(users.get(username), password):
|
||||||
return username
|
return username
|
||||||
|
|
||||||
@app.route("/ping", methods=['GET'])
|
|
||||||
@auth.login_required
|
|
||||||
def ping():
|
|
||||||
remote_user = auth.username()
|
|
||||||
app.logger.info('Received ping for'
|
|
||||||
f' anchor f2b-jail/{remote_user}')
|
|
||||||
return jsonify({'anchor': f'f2b-jail/{remote_user}',
|
|
||||||
'operation': 'ping',
|
|
||||||
'result': 'pong'})
|
|
||||||
@app.route("/flush/<name>", methods=['GET'])
|
@app.route("/flush/<name>", methods=['GET'])
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
def flush(name):
|
def flush(name):
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
def test_ping(client, mocker, valid_credentials):
|
|
||||||
'''
|
|
||||||
Test application health check
|
|
||||||
'''
|
|
||||||
|
|
||||||
response = client.get("/ping",
|
|
||||||
headers={"Authorization":
|
|
||||||
"Basic " + valid_credentials})
|
|
||||||
|
|
||||||
assert response.json['operation'] == 'ping'
|
|
Loading…
x
Reference in New Issue
Block a user