Commit b300df11 authored by lopezaguilar's avatar lopezaguilar
Browse files

Management of kind parameters with Hosted and Cached @contexts

parent 860b67bc
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -16,39 +16,39 @@ ${reason_200}= OK
${reason_204}=      No Content


*** Test Cases ***    DETAILS    KIND
*** Test Cases ***    DETAILS    KIND    COUNT
052_01_01 List @contexts with neither details or kind and not previously created @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    ${EMPTY}
    ${EMPTY}    ${EMPTY}    1
052_01_02 List @contexts with no details and kind equal to hosted and not previously created @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    Hosted
    ${EMPTY}    Hosted    0
052_01_03 List @contexts with no details and kind equal to cached and not previously created @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    Cached
    ${EMPTY}    Cached    1
052_01_04 List @contexts with no details and kind equal to implicitlycreated and not previously created @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    ImplicitlyCreated
    ${EMPTY}    ImplicitlyCreated    0
052_01_05 List @contexts with details equal to false and no kind and not previously created @context
    [Tags]    ctx-serve    5_13_3
    false    ${EMPTY}
    false    ${EMPTY}    1
052_01_06 List @contexts with details equal to false and kind equal to hosted and not previously created @context
    [Tags]    ctx-serve    5_13_3
    false    Hosted
    false    Hosted    0
052_01_07 List @contexts with details equal to false and kind equal to cached and not previously created @context
    [Tags]    ctx-serve    5_13_3
    false    Cached
    false    Cached    1
052_01_08 List @contexts with details equal to false and kind equal to implicitlycreated and not previously created @context
    [Tags]    ctx-serve    5_13_3
    false    ImplicitlyCreated
    false    ImplicitlyCreated    0


*** Keywords ***
List @contexts with no previous created @context
    [Documentation]    Check that you can list @contexts
    [Arguments]    ${details}    ${kind}
    [Arguments]    ${details}    ${kind}    ${count}
    ${response}=    List @contexts    ${details}    ${kind}

    Check Response Status Code    200    ${response.status_code}
    Check Response Reason set to    ${response.reason}    ${reason_200}
    Check Context Response Body Containing a list with one URL equal to default @context    ${response.json()}
    Check Context Response Body Containing a list of identifiers    ${response.json()}    ${count}
+19 −13
Original line number Diff line number Diff line
@@ -18,31 +18,31 @@ ${reason_200}= OK
${reason_204}=          No Content


*** Test Cases ***    DETAILS    KIND
*** Test Cases ***    DETAILS    KIND    COUNT
052_02_01 List @contexts with neither details or kind and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    ${EMPTY}
    ${EMPTY}    ${EMPTY}    2
052_02_02 List @contexts with no details and kind equal to hosted and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    Hosted
    ${EMPTY}    Hosted    1
052_02_03 List @contexts with no details and kind equal to cached and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    Cached
    ${EMPTY}    Cached    1
052_02_04 List @contexts with no details and kind equal to implicitlycreated and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    ImplicitlyCreated
    ${EMPTY}    ImplicitlyCreated    0
052_02_05 List @contexts with details equal to false and no kind and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    false    ${EMPTY}
    false    ${EMPTY}    2
052_02_06 List @contexts with details equal to false and kind equal to hosted and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    false    Hosted
    false    Hosted    1
052_02_07 List @contexts with details equal to false and kind equal to cached abd with previously one add @context
    [Tags]    ctx-serve    5_13_3
    false    Cached
    false    Cached    1
052_02_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously one add @context
    [Tags]    ctx-serve    5_13_3
    false    ImplicitlyCreated
    false    ImplicitlyCreated    0


*** Keywords ***
@@ -50,17 +50,23 @@ Create Initial @context
    ${response}=    Add a new @context    ${first_filename}
    Check Response Status Code    201    ${response.status_code}
    ${uri}=    Fetch Id From Response Location Header    ${response.headers}
    Set Suite Variable    ${uri}
    @{uri_list}=    Create List
    Append To List    ${uri_list}    ${uri}
    Set Suite Variable    ${uri_list}

List @contexts with one previous created @context
    [Documentation]    Check that you can list @contexts
    [Arguments]    ${details}    ${kind}
    [Arguments]    ${details}    ${kind}    ${count}

    ${response}=    List @contexts    ${details}    ${kind}

    Check Response Status Code    200    ${response.status_code}
    Check Response Reason set to    ${response.reason}    ${reason_200}
    Check Context Response Body Containing a list with more than one URL    ${response.json()}    2    ${uri}
    Check Context Response Body Containing a list of identifiers
    ...    ${response.json()}
    ...    ${count}
    ...    ${uri_list}
    ...    ${kind}

Delete Initial @context
    Delete a @context    ${uri}
    Delete a @context    ${uri_list[0]}
+21 −17
Original line number Diff line number Diff line
@@ -20,31 +20,31 @@ ${reason_200}= OK
${reason_204}=          No Content


*** Test Cases ***    DETAILS    KIND
*** Test Cases ***    DETAILS    KIND    COUNT
052_03_01 List @contexts with neither details or kind and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    ${EMPTY}
    ${EMPTY}    ${EMPTY}    4
052_03_02 List @contexts with no details and kind equal to hosted and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    Hosted
    ${EMPTY}    Hosted    3
052_03_03 List @contexts with no details and kind equal to cached and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    Cached
    ${EMPTY}    Cached    1
052_03_04 List @contexts with no details and kind equal to implicitlycreated and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    ${EMPTY}    ImplicitlyCreated
    ${EMPTY}    ImplicitlyCreated    0
052_03_05 List @contexts with details equal to false and no kind and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    false    ${EMPTY}
    false    ${EMPTY}    4
052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    false    Hosted
    false    Hosted    3
052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context
    [Tags]    ctx-serve    5_13_3
    false    Cached
    false    Cached    1
052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    false    ImplicitlyCreated
    false    ImplicitlyCreated    0


*** Keywords ***
@@ -64,24 +64,28 @@ Create Initial set of @contexts
    ${third_uri}=    Fetch Id From Response Location Header    ${response.headers}
    Set Suite Variable    ${third_uri}

    @{uris}=    Create List
    Append To List    ${uris}    ${first_uri}
    Append To List    ${uris}    ${second_uri}
    Append To List    ${uris}    ${third_uri}
    Set Suite Variable    ${uris}
    @{uri_list}=    Create List
    Append To List    ${uri_list}    ${first_uri}
    Append To List    ${uri_list}    ${second_uri}
    Append To List    ${uri_list}    ${third_uri}
    Set Suite Variable    ${uri_list}

List @contexts with several previous created @context
    [Documentation]    Check that you can list @contexts
    [Arguments]    ${details}    ${kind}
    [Arguments]    ${details}    ${kind}    ${count}

    ${response}=    List @contexts    ${details}    ${kind}

    Check Response Status Code    200    ${response.status_code}
    Check Response Reason set to    ${response.reason}    ${reason_200}
    Check Context Response Body Containing a list with several URLs    ${response.json()}    4    ${uris}
    Check Context Response Body Containing a list of identifiers
    ...    ${response.json()}
    ...    ${count}
    ...    ${uri_list}
    ...    ${kind}

Delete Initial @contexts
    FOR    ${uri}    IN    @{uris}
    FOR    ${uri}    IN    @{uri_list}
        Log    URI: ${uri}
        Delete a @context    ${uri}
    END
+7 −7
Original line number Diff line number Diff line
@@ -20,19 +20,19 @@ ${reason_200}= OK
${reason_204}=          No Content


*** Test Cases ***    DETAILS    KIND
*** Test Cases ***    DETAILS    KIND    COUNT
052_03_05 List @contexts with details equal to false and no kind and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    true    ${EMPTY}
    true    ${EMPTY}    4
052_03_06 List @contexts with details equal to false and kind equal to hosted and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    true    Hosted
    true    Hosted    3
052_03_07 List @contexts with details equal to false and kind equal to cached abd with previously several add @context
    [Tags]    ctx-serve    5_13_3
    true    Cached
    true    Cached    1
052_03_08 List @contexts with details equal to false and kind equal to implicitlycreated and with previously several add @context
    [Tags]    ctx-serve    5_13_3
    true    ImplicitlyCreated
    true    ImplicitlyCreated    0


*** Keywords ***
@@ -60,7 +60,7 @@ Create Initial set of @contexts

List @contexts with several previous created @context
    [Documentation]    Check that you can list @contexts
    [Arguments]    ${details}    ${kind}
    [Arguments]    ${details}    ${kind}    ${count}

    ${response}=    List @contexts    ${details}    ${kind}

@@ -70,7 +70,7 @@ List @contexts with several previous created @context
    # We need to check the list of responses
    Check Context Response Body Containing a JSONObject with details of the @contexts
    ...    ${response.json()}
    ...    4
    ...    ${count}
    ...    ${uris}

Delete Initial @contexts
+1 −3
Original line number Diff line number Diff line
@@ -36,9 +36,7 @@ ${reason_422}= Unprocessable
052_04_05 Delete a Hosted @contexts with a valid id and reload equal to true
    [Tags]    ctx-delete    5_13_5
    ${uri}    true    400    ${reason_400}    ${ERROR_TYPE_BAD_REQUEST_DATA}
052_04_06 Delete a cached @contexts with reload false
    [Tags]    ctx-delete    5_13_5
    ${cached_id}    false    422    ${reason_422}    ${ERROR_OPERATION_NOT_SUPPORTED}
# TODO: reload=true and Implicitily created @context
# TODO: Check the case of reload=true and Cached context -> error downloading the @context: LdContextNotAvailable


Loading