Kailash Khalasi | 7261480 | 2018-05-02 09:21:23 -0700 | [diff] [blame^] | 1 | |
| 2 | *** Settings *** |
| 3 | Documentation Test Suite for XOS APIs |
| 4 | Suite Setup Setup |
| 5 | Suite Teardown Teardown |
| 6 | Test Template Verify API Functionality |
| 7 | Library Collections |
| 8 | Library String |
| 9 | Library OperatingSystem |
| 10 | Library XML |
| 11 | Library RequestsLibrary |
| 12 | Library HttpLibrary.HTTP |
| 13 | Library ../Framework/utils/utils.py |
| 14 | Library ../Framework/restApi.py |
| 15 | Resource XOSApiTestLibrary.robot |
| 16 | Variables ../Properties/RestApiProperties.py |
| 17 | |
| 18 | *** Variables *** |
| 19 | ${xos_service} core |
| 20 | |
| 21 | *** Test Cases *** TYPE API |
| 22 | {% for m in proto.messages %} |
| 23 | {%- if xproto_unquote(m.options.app_label) != "core" -%} |
| 24 | {%- if m.name not in ['XOSBase'] -%} |
| 25 | {%- if m.name not in ['ServiceMonitoringAgentInfo', 'XOS'] -%} |
| 26 | {% autoescape false %} |
| 27 | {% endautoescape %} |
| 28 | Create {{ m.name }} CREATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}s ${json_{{ m.name | lower}}_1} |
| 29 | [Tags] {{ m.name }} |
| 30 | |
| 31 | Update {{ m.name }} UPDATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}s ${json_{{ m.name | lower}}_updated_1} ${id} |
| 32 | [Tags] {{ m.name }} |
| 33 | |
| 34 | Get {{ m.name }} RETRIEVE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}s ${json_{{ m.name | lower}}_updated_1} ${id} ${json_{{ m.name | lower}}_updated_key} |
| 35 | [Tags] {{ m.name }} |
| 36 | |
| 37 | Delete {{ m.name }} DELETE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}s data_id=${id} |
| 38 | [Tags] {{ m.name }} |
| 39 | {% else %} |
| 40 | Create {{ m.name }} CREATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}es ${json_{{ m.name | lower}}_1} |
| 41 | [Tags] {{ m.name }} |
| 42 | |
| 43 | Update {{ m.name }} UPDATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}es ${json_{{ m.name | lower}}_updated_1} ${id} |
| 44 | [Tags] {{ m.name }} |
| 45 | |
| 46 | Get {{ m.name }} RETRIEVE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}es ${json_{{ m.name | lower}}_updated_1} ${id} ${json_{{ m.name | lower}}_updated_key} |
| 47 | [Tags] {{ m.name }} |
| 48 | |
| 49 | Delete {{ m.name }} DELETE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ m.name | lower}}es data_id=${id} |
| 50 | [Tags] {{ m.name }} |
| 51 | {% endif -%} |
| 52 | {% endif -%} |
| 53 | {% endif -%} |
| 54 | {% endfor %} |
| 55 | |
| 56 | *** Keywords *** |
| 57 | Setup |
| 58 | Setup Tests |
| 59 | |
| 60 | Teardown |
| 61 | Teardown Tests |