Skip to content
Snippets Groups Projects
Commit 02703a2f authored by Vidya Ambadipudi's avatar Vidya Ambadipudi
Browse files

added tests and removed unused category

parent 6655d690
Branches
Tags
No related merge requests found
......@@ -696,7 +696,6 @@ class PollerServiceCategory(str, enum.Enum):
IAS = 'ias'
RE_CUST = 're_cust'
RE_PEER = 're_peer'
BACKBONE = 'backbone'
def _classify_interface(ifc):
......
......@@ -65,16 +65,22 @@ def test_build_interface_services(mocked_worker_module):
assert type in ('mdvpn',
'lhcone_peer',
're_peer',
're_cust',
'ias',
'lhcone',
'lhcone_cust')
'lhcone_cust',
'l2_circuits',
'automated_l2_circuits')
expected_seen_types = set(['mdvpn',
'lhcone_peer',
're_peer',
're_cust',
'ias',
'lhcone',
'lhcone_cust'])
'lhcone_cust',
'l2_circuits',
'automated_l2_circuits'])
assert seen_types == expected_seen_types
......@@ -126,6 +132,12 @@ def test_build_subnet_db(mocked_worker_module):
# this data is just enough to be an example
# ... seems the method is not yet ready for testing
@pytest.mark.parametrize('description,expected_categories', [
[
'SRV_MDVPN CUSTOMER SANET SRF9939441 | VPN-Proxy to NREN CE',
{
worker.PollerServiceCategory.MDVPN
}
],
[
'SRV_L3VPN CUSTOMER ESNET LHCONE SRF9928635 | ASN293 | GEN-EEX-ESNET-LHCONE', # noqa
{
......@@ -133,9 +145,27 @@ def test_build_subnet_db(mocked_worker_module):
}
],
[
'SRV_MDVPN CUSTOMER SANET SRF9939441 | VPN-Proxy to NREN CE',
'SRV_L3VPN RE KREONET LHCONE SRF17072 | ASN17579', # noqa
{
worker.PollerServiceCategory.MDVPN
worker.PollerServiceCategory.LHCONE_PEER
}
],
[
'SRV_IAS CUSTOMER ACONET SRF9947199 IASPS | ASN1853', # noqa
{
worker.PollerServiceCategory.IAS
}
],
[
'SRV_GLOBAL RE_INTERCONNECT HBKU SRF18085 | ASN34945|', # noqa
{
worker.PollerServiceCategory.RE_PEER
}
],
[
'SRV_GLOBAL RE_INTERCONNECT HBKU SRF18085 | ASN34945|', # noqa
{
worker.PollerServiceCategory.RE_PEER
}
]
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment