Commit dbfbffad authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

Merge remote-tracking branch 'origin/hardening/038s' into parsespec

parents ae4fa60d bd6103f1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,13 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-inacti
    Check Response Headers Containing URI set to    ${subscription_id}    ${response.headers}
    ${response1}=    Retrieve Context Source Registration Subscription
    ...    subscription_id=${subscription_id}

    # The conversion of a boolean data to json for a python object transform false -> False and true -> True
    Check Response Body Containing a Boolean Attribute set to
    ...    expected_attribute_name=isActive
    ...    response_body=${response1.json()}
    ...    expected_attribute_value=False

    Check Response Body Containing an Attribute set to
    ...    expected_attribute_name=status
    ...    response_body=${response1.json()}
+7 −1
Original line number Diff line number Diff line
@@ -26,14 +26,20 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-expire
    Check Response Status Code    201    ${response.status_code}
    Check Response Headers Containing URI set to    ${subscription_id}    ${response.headers}
    Sleep    15s

    ${response1}=    Retrieve Context Source Registration Subscription
    ...    subscription_id=${subscription_id}

    Check Dictionary Contains DateTime Value
    ...    dictionary=${response1.json()}
    ...    key=expiresAt
    ...    expected value=${expiresAt}

    Check Response Body Containing an Attribute set to
    ...    expected_attribute_name=status
    ...    response_body=${response1.json()}
    ...    expected_attribute_value=expired


*** Keywords ***
Generate Random Ids For Context Source Registration Subscriptions
    ${subscription_id}=    Generate Random Entity Id    ${subscription_id_prefix}
+3 −4
Original line number Diff line number Diff line
@@ -21,10 +21,9 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample
    ${subscription_payload}=    Load Test Sample    ${subscription_payload_file_path}    ${subscription_id}
    ${response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    409    ${response.status_code}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    ...    ${response.json()}
    ...    ${ERROR_TYPE_ALREADY_EXISTS}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
    Check Response Body Containing ProblemDetails Element
    ...    response_body=${response.json()}
    ...    problem_type=${ERROR_TYPE_ALREADY_EXISTS}


*** Keywords ***
+3 −4
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ Create Invalid Context Source Registration Subscription
    ${subscription_payload}=    Load Test Sample    ${filepath}    ${subscription_id}
    ${response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    400    ${response.status_code}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    ...    ${response.json()}
    ...    ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
    Check Response Body Containing ProblemDetails Element
    ...    response_body=${response.json()}
    ...    problem_type=${ERROR_TYPE_BAD_REQUEST_DATA}
+3 −4
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-expire
    ${subscription_payload}=    Load Test Sample    ${subscription_payload_file_path}    ${subscription_id}
    ${response}=    Create Context Source Registration Subscription    ${subscription_payload}
    Check Response Status Code    400    ${response.status_code}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to
    ...    ${response.json()}
    ...    ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
    Check Response Body Containing ProblemDetails Element
    ...    response_body=${response.json()}
    ...    problem_type=${ERROR_TYPE_BAD_REQUEST_DATA}
Loading