Commit 966bdfc9 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF173-testing' into 'staging'

Ocf173 testing CCF Id

See merge request !159
parents 92f408f2 5cddfba7
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
*** Settings ***
Force Tags    helper
 No newline at end of file
+29 −0
Original line number Original line Diff line number Diff line
*** Settings ***
Resource            /opt/robot-tests/tests/resources/common.resource
Library             /opt/robot-tests/tests/libraries/bodyRequests.py
Library             XML
Library             String
Resource            /opt/robot-tests/tests/resources/common/basicRequests.robot
Resource            ../../resources/common.resource
Resource            ../../resources/common/basicRequests.robot

Suite Teardown      Reset Testing Environment
Test Setup          Reset Testing Environment
Test Teardown       Reset Testing Environment


*** Variables ***
${API_INVOKER_NOT_REGISTERED}       not-valid
${SUBSCRIBER_ID_NOT_VALID}          not-valid
${SUBSCRIPTION_ID_NOT_VALID}        not-valid


*** Test Cases ***
Obtain ccfId
    [Tags]    helper_1  smoke

    ${ccfId}=    Get Capif Ccf Id

    Log    CCF ID obtained: ${ccfId}
    Should Match Regexp    ${ccfId}    ^CCF[a-zA-Z0-9]+
    
 No newline at end of file
+13 −0
Original line number Original line Diff line number Diff line
@@ -967,3 +967,16 @@ Get Number Of Services
    ${size}=    Get Length    ${resp.json()['services']}
    ${size}=    Get Length    ${resp.json()['services']}


    RETURN    ${size}
    RETURN    ${size}

Get Capif Ccf Id
    ${resp}=    Get Request Capif
    ...    /helper/getCcfId
    ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
    ...    username=${SUPERADMIN_USERNAME}

    Should Be Equal As Integers    ${resp.status_code}    200
    ${ccfId}=    Get From Dictionary    ${resp.json()}    ccf_id
    Set Suite Variable    ${CCF_ID}    ${ccfId}

    RETURN    ${ccfId}