Skip to content
Snippets Groups Projects
Commit b57bf968 authored by Erik Reid's avatar Erik Reid
Browse files

don't return 404 for unknown peer addresses

parent cda04dcf
Branches
Tags
No related merge requests found
......@@ -272,11 +272,11 @@ def peer_info(address):
if interfaces:
result['interfaces'] = interfaces
if not result:
return Response(
response='no peering info found for %s' % address,
status=404,
mimetype="text/html")
# if not result:
# return Response(
# response='no peering info found for %s' % address,
# status=404,
# mimetype="text/html")
result = json.dumps(result)
# cache this data for the next call
......
......@@ -299,7 +299,9 @@ def test_peer_not_found(client):
rv = client.get(
'/classifier/peer-info/1.2.3.4',
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 404
assert rv.status_code == 200
response_data = json.loads(rv.data.decode('utf-8'))
assert response_data == {}
@pytest.mark.parametrize('equipment,entity_name,card_id,port_number', [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment