Commit 82a1ec2f authored by Claudia Carballo Gonzalez's avatar Claudia Carballo Gonzalez
Browse files

add new tests to visibility_control.robot

parent e51e456e
Loading
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -286,6 +286,50 @@ Create and Get Specific Visibility Control Rule


# ==================== DECISION ENDPOINT TESTS ====================
Discover Published service APIs by Authorised API Invoker Visibility Control
    [Tags]    visibility_control-10
    # Register APF
    ${register_user_info}=    Provider Default Registration

    # Publish one api
    ${service_api_description_published}    ${resource_url}    ${request_body}=    Publish Service Api
    ...    ${register_user_info}

    # Default Invoker Registration and Onboarding
    ${register_user_info_invoker}    ${url}    ${request_body}=    Invoker Default Onboarding

    # Test
    ${resp}=    Get Request Capif
    ...    ${DISCOVER_URL}${register_user_info_invoker['api_invoker_id']}&aef-id=${register_user_info['aef_id']}
    ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
    ...    username=${INVOKER_USERNAME}

    Check Response Variable Type And Values    ${resp}    200    DiscoveredAPIs

    # Check Results
    Dictionary Should Contain Key    ${resp.json()}    serviceAPIDescriptions
    Should Not Be Empty    ${resp.json()['serviceAPIDescriptions']}
    Length Should Be    ${resp.json()['serviceAPIDescriptions']}    1
    List Should Contain Value    ${resp.json()['serviceAPIDescriptions']}    ${service_api_description_published}


    #Configurar visibility control (añadir una regla), volver a copiar a partir de # Test y check results length 0
















Decision Endpoint Without Active Rules Returns All APIs
    [Tags]    visibility_control-9