Commit 11b7b763 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

Merge branch 'refactor/isolate-and-check-setup-steps' into 'develop'

refactor: isolate and check setup steps

See merge request cim/ngsi-ld-test-suite!141
parents b1fcb83d 59e3f774
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -30,11 +30,12 @@ ${filename}= building-simple-attributes-sample.json
*** Keywords ***
*** Keywords ***
Setup Initial Entity
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${entity_id}
    ...    ${entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${entity_id}
    Set Suite Variable    ${entity_id}


Delete Initial Entity
Delete Initial Entity
+2 −1
Original line number Original line Diff line number Diff line
@@ -28,11 +28,12 @@ ${expectation_file}= types/expectations/attribute-027-01-expectation.json
*** Keywords ***
*** Keywords ***
Setup Initial Entity
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${entity_id}
    ...    ${entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${entity_id}
    Set Suite Variable    ${entity_id}


Delete Initial Entity
Delete Initial Entity
+2 −1
Original line number Original line Diff line number Diff line
@@ -36,11 +36,12 @@ Retrieve Available Attributes


Setup Initial Entity
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${entity_id}
    ...    ${entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Check Response Status Code    201    ${create_response.status_code}
    Set Test Variable    ${entity_id}
    Set Test Variable    ${entity_id}


Delete Initial Entity
Delete Initial Entity
+5 −3
Original line number Original line Diff line number Diff line
@@ -31,17 +31,19 @@ ${filename}= building-simple-attributes-sample.json
Setup Initial Entities
Setup Initial Entities
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Create Entity Selecting Content Type
    Check Response Status Code    201    ${create_response1.status_code}
    Set Suite Variable    ${first_entity_id}
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${second_entity_id}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Set Suite Variable    ${first_entity_id}
    Check Response Status Code    201    ${create_response2.status_code}
    Set Suite Variable    ${second_entity_id}
    Set Suite Variable    ${second_entity_id}


Delete Initial Entities
Delete Initial Entities
+5 −3
Original line number Original line Diff line number Diff line
@@ -29,17 +29,19 @@ ${expectation_file}= types/expectations/entity-type-info-024-01-expectati
Setup Initial Entities
Setup Initial Entities
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Create Entity Selecting Content Type
    Check Response Status Code    201    ${create_response1.status_code}
    Set Suite Variable    ${first_entity_id}
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${filename}
    ...    ${second_entity_id}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    ...    ${ngsild_test_suite_context}
    Set Suite Variable    ${first_entity_id}
    Check Response Status Code    201    ${create_response2.status_code}
    Set Suite Variable    ${second_entity_id}
    Set Suite Variable    ${second_entity_id}


Delete Initial Entities
Delete Initial Entities
Loading