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

fix expected peer-info snmp schema

parent 0b0c766f
No related branches found
No related tags found
No related merge requests found
......@@ -255,10 +255,12 @@ IX_PUBLIC_PEER_INFO_KEYS = {
@pytest.mark.parametrize('peer_address,expected_response_keys', [
('147.91.0.117', VPN_RR_PEER_INFO_KEYS),
('62.40.96.18', VPN_RR_PEER_INFO_KEYS | {'interfaces'}),
('2001:07f8:0036:0000:0000:3417:0000:0001', IX_PUBLIC_PEER_INFO_KEYS),
('2001:07f8:0030:0000:0002:0002:0003:2934', IX_PUBLIC_PEER_INFO_KEYS),
('195.66.227.154', IX_PUBLIC_PEER_INFO_KEYS),
('149.29.9.9', {'interfaces', 'locations', 'snmp'}),
('62.40.125.142', {'interfaces', 'locations', 'snmp'})
])
def test_peer_info(
client, peer_address, expected_response_keys):
......@@ -350,10 +352,11 @@ def test_peer_info(
"snmp-info": {
"type": "object",
"properties": {
"hostname": {"type": "string"},
"oid": {"type": "string"},
"community": {"type": "string"}
},
"required": ["oid", "community"],
"required": ["oid", "community", "hostname"],
"additionalProperties": False
}
}
......@@ -375,7 +378,10 @@ def test_peer_info(
"items": {"$ref": "#/definitions/interface-lookup-info"}
},
"locations": {"$ref": "#/definitions/locations-list"},
"snmp": {"$ref": "#/definitions/snmp-info"}
"snmp": {
"type": "array",
"items": {"$ref": "#/definitions/snmp-info"}
}
},
"additionalProperties": False
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment