Commit 4fa0abb8 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

ECOC22 End-to-End test:

- Fixed check of service types and number of connections
parent 14ed219f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): #

    response = context_client.ListServices(ADMIN_CONTEXT_ID)
    LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response)))
    assert len(response.services) == 3 # 1xL2NM + 2xTAPI
    assert len(response.services) == 3 # 1xLxNM + 2xTAPI

    for service in response.services:
        service_id = service.service_id
@@ -60,7 +60,7 @@ def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): #
        LOGGER.info('  ServiceId[{:s}] => Connections[{:d}] = {:s}'.format(
            grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response)))

        if service.service_type == ServiceTypeEnum.SERVICETYPE_L2NM:
        if service.service_type in {ServiceTypeEnum.SERVICETYPE_L2NM, ServiceTypeEnum.SERVICETYPE_L3NM}:
            assert len(response.connections) == 2 # 2 connections per service (primary + backup)
        elif service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE:
            assert len(response.connections) == 1 # 1 connection per service
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # p

    response = context_client.ListServices(ADMIN_CONTEXT_ID)
    LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response)))
    assert len(response.services) == 3 # 1xL2NM + 2xTAPI
    assert len(response.services) == 3 # 1xLxNM + 2xTAPI

    service_uuids = set()
    for service in response.services:
@@ -47,7 +47,7 @@ def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # p
        LOGGER.info('  ServiceId[{:s}] => Connections[{:d}] = {:s}'.format(
            grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response)))

        if service.service_type == ServiceTypeEnum.SERVICETYPE_L2NM:
        if service.service_type in {ServiceTypeEnum.SERVICETYPE_L2NM, ServiceTypeEnum.SERVICETYPE_L3NM}:
            assert len(response.connections) == 2 # 2 connections per service (primary + backup)
            service_uuid = service_id.service_uuid.uuid
            service_uuids.add(service_uuid)