Commit 885c0a53 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Comment refence test on api status

parent b5a26ad8
Loading
Loading
Loading
Loading
Loading
+60 −60
Original line number Original line Diff line number Diff line
@@ -258,63 +258,63 @@ Publish without apiStatus feature receive eventDetails without eventDetails (api




###---
###---
Invoker receives Service API Invocation events
# Invoker receives Service API Invocation events
    [Tags]    api_status-x    mockserver    smoke
#     [Tags]    api_status-x    mockserver    smoke


    # Initialize Mock server
#     # Initialize Mock server
    Init Mock Server
#     Init Mock Server


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


    # Register APF
#     # Register APF
    ${register_user_info_provider}=    Provider Default Registration
#     ${register_user_info_provider}=    Provider Default Registration


    ${aef_id}=    Set Variable    ${register_user_info_provider['aef_id']}
#     ${aef_id}=    Set Variable    ${register_user_info_provider['aef_id']}


    # Subscribe to events
#     # Subscribe to events
    ${events_list}=    Create List    SERVICE_API_AVAILABLE    SERVICE_API_UNAVAILABLE
#     ${events_list}=    Create List    SERVICE_API_AVAILABLE    SERVICE_API_UNAVAILABLE
    ${aef_ids}=    Create List    ${register_user_info_provider['aef_id']}
#     ${aef_ids}=    Create List    ${register_user_info_provider['aef_id']}
    ${event_filter}=    Create Capif Event Filter    aefIds=${aef_ids}
#     ${event_filter}=    Create Capif Event Filter    aefIds=${aef_ids}
    ${event_filters}=    Create List    ${event_filter}
#     ${event_filters}=    Create List    ${event_filter}


    ${request_body}=    Create Events Subscription
#     ${request_body}=    Create Events Subscription
    ...    events=@{events_list}
#     ...    events=@{events_list}
    ...    notification_destination=${NOTIFICATION_DESTINATION_URL}/testing
#     ...    notification_destination=${NOTIFICATION_DESTINATION_URL}/testing
    ...    event_filters=${event_filters}
#     ...    event_filters=${event_filters}
    ...    supported_features=4
#     ...    supported_features=4
    ${resp}=    Post Request Capif
#     ${resp}=    Post Request Capif
    ...    /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions
#     ...    /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions
    ...    json=${request_body}
#     ...    json=${request_body}
    ...    server=${CAPIF_HTTPS_URL}
#     ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
#     ...    verify=ca.crt
    ...    username=${INVOKER_USERNAME}
#     ...    username=${INVOKER_USERNAME}


    # Check Results
#     # Check Results
    Check Response Variable Type And Values    ${resp}    201    EventSubscription
#     Check Response Variable Type And Values    ${resp}    201    EventSubscription
    ${subscriber_id}    ${subscription_id}=    Check Event Location Header    ${resp}
#     ${subscriber_id}    ${subscription_id}=    Check Event Location Header    ${resp}


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


    # Provider Remove service_1 published API
#     # Provider Remove service_1 published API
    ${resp}=    Delete Request Capif
#     ${resp}=    Delete Request Capif
    ...    ${resource_url.path}
#     ...    ${resource_url.path}
    ...    server=${CAPIF_HTTPS_URL}
#     ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
#     ...    verify=ca.crt
    ...    username=${APF_PROVIDER_USERNAME}
#     ...    username=${APF_PROVIDER_USERNAME}


    Status Should Be    204    ${resp}
#     Status Should Be    204    ${resp}


    # Check Event Notifications
#     # Check Event Notifications
    ## Create check Events to ensure all notifications were received
#     ## Create check Events to ensure all notifications were received
    ${service_api_available_resources}=    Create List    ${resource_url}
#     ${service_api_available_resources}=    Create List    ${resource_url}
    ${service_api_unavailable_resources}=    Create List    ${resource_url}
#     ${service_api_unavailable_resources}=    Create List    ${resource_url}
    ${events_expected}=    Create Expected Events For Service API Notifications
#     ${events_expected}=    Create Expected Events For Service API Notifications
    ...    subscription_id=${subscription_id}
#     ...    subscription_id=${subscription_id}
    ...    service_api_available_resources=${service_api_available_resources}
#     ...    service_api_available_resources=${service_api_available_resources}
    ...    service_api_unavailable_resources=${service_api_unavailable_resources}
#     ...    service_api_unavailable_resources=${service_api_unavailable_resources}
    ## Check Events Expected towards received notifications at mock server
#     ## Check Events Expected towards received notifications at mock server
    Wait Until Keyword Succeeds    5x    5s    Check Mock Server Notification Events    ${events_expected}
#     Wait Until Keyword Succeeds    5x    5s    Check Mock Server Notification Events    ${events_expected}