diff options
Diffstat (limited to 'test/integration/targets/exos_lldp_global')
10 files changed, 0 insertions, 274 deletions
diff --git a/test/integration/targets/exos_lldp_global/defaults/main.yaml b/test/integration/targets/exos_lldp_global/defaults/main.yaml deleted file mode 100644 index 164afead28..0000000000 --- a/test/integration/targets/exos_lldp_global/defaults/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -testcase: "[^_].*" -test_items: [] diff --git a/test/integration/targets/exos_lldp_global/meta/main.yaml b/test/integration/targets/exos_lldp_global/meta/main.yaml deleted file mode 100644 index 32cf5dda7e..0000000000 --- a/test/integration/targets/exos_lldp_global/meta/main.yaml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/test/integration/targets/exos_lldp_global/tasks/httpapi.yaml b/test/integration/targets/exos_lldp_global/tasks/httpapi.yaml deleted file mode 100644 index 7c29713da6..0000000000 --- a/test/integration/targets/exos_lldp_global/tasks/httpapi.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Collect all httpapi test cases - find: - paths: "{{ role_path }}/tests/httpapi" - patterns: "{{ testcase }}.yaml" - use_regex: true - register: test_cases - delegate_to: localhost - -- name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - -- name: Run test case (connection=httpapi) - include: "{{ test_case_to_run }}" - vars: - ansible_connection: httpapi - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/exos_lldp_global/tasks/main.yaml b/test/integration/targets/exos_lldp_global/tasks/main.yaml deleted file mode 100644 index 22eac15464..0000000000 --- a/test/integration/targets/exos_lldp_global/tasks/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- { include: httpapi.yaml, tags: ['httpapi'] } diff --git a/test/integration/targets/exos_lldp_global/tests/httpapi/_populate_config.yaml b/test/integration/targets/exos_lldp_global/tests/httpapi/_populate_config.yaml deleted file mode 100644 index 3740e8e2c9..0000000000 --- a/test/integration/targets/exos_lldp_global/tests/httpapi/_populate_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Populate Config - exos_config: - lines: - - configure lldp transmit-interval 50 - - configure lldp ports all no-advertise all-tlvs - - configure lldp ports all advertise system-name system-description system-capabilities diff --git a/test/integration/targets/exos_lldp_global/tests/httpapi/_reset_config.yaml b/test/integration/targets/exos_lldp_global/tests/httpapi/_reset_config.yaml deleted file mode 100644 index e6ba1e4154..0000000000 --- a/test/integration/targets/exos_lldp_global/tests/httpapi/_reset_config.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Reset Config - exos_config: - lines: - - configure lldp transmit-interval 30 - - configure lldp ports all no-advertise all-tlvs - - configure lldp ports all advertise system-name system-description diff --git a/test/integration/targets/exos_lldp_global/tests/httpapi/deleted.yaml b/test/integration/targets/exos_lldp_global/tests/httpapi/deleted.yaml deleted file mode 100644 index f0b260ed35..0000000000 --- a/test/integration/targets/exos_lldp_global/tests/httpapi/deleted.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -- debug: - msg: "Start exos_lldp_global deleted integration tests ansible_connection={{ ansible_connection }}" - -- include_tasks: _reset_config.yaml - -- include_tasks: _populate_config.yaml - -- block: - - name: Delete attributes of LLDP service - exos_lldp_global: &deleted - config: - state: deleted - register: result - - - name: Assert that the before dicts were correctly generated - assert: - that: - - "{{ populate == result['before']}}" - - - name: Assert that correct set of requests were generated - assert: - that: - - "{{ deleted['requests'][0]['method'] == result['requests'][0]['method'] }}" - - "{{ deleted['requests'][0]['path'] == result['requests'][0]['path'] }}" - - "{{ deleted['requests'][0]['data'] == result['requests'][0]['data'] }}" - - - name: Assert that the after dicts were correctly generated - assert: - that: - - "{{ deleted['after'] == result['after']}}" - - - name: Delete attributes of all configured interfaces (IDEMPOTENT) - exos_lldp_global: *deleted - register: result - - - name: Assert that the previous task was idempotent - assert: - that: - - "result.changed == false" - - - name: Assert that the before dicts were correctly generated - assert: - that: - - "{{ deleted['after'] == result['before'] }}" - - always: - - include_tasks: _reset_config.yaml diff --git a/test/integration/targets/exos_lldp_global/tests/httpapi/merged.yaml b/test/integration/targets/exos_lldp_global/tests/httpapi/merged.yaml deleted file mode 100644 index 2bf2a24491..0000000000 --- a/test/integration/targets/exos_lldp_global/tests/httpapi/merged.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- debug: - msg: "START exos_lldp_global merged integration tests on connection={{ ansible_connection }}" - -- include_tasks: _reset_config.yaml - -- block: - - name: Merge the provided configuration with the exisiting running configuration - exos_lldp_global: &merged - config: - interval: 10 - tlv_select: - system_description: false - system_capabilities: false - state: merged - register: result - - - name: Assert that before dicts were correctly generated - assert: - that: "{{ merged['before'] == result['before'] }}" - - - name: Assert that correct set of requests were generated - assert: - that: - - "{{ merged['requests'][0]['method'] == result['requests'][0]['method'] }}" - - "{{ merged['requests'][0]['path'] == result['requests'][0]['path'] }}" - - "{{ merged['requests'][0]['data'] == result['requests'][0]['data'] }}" - - - name: Assert that after dicts was correctly generated - assert: - that: - - "{{ merged['after'] == result['after'] }}" - - - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT) - exos_lldp_global: *merged - register: result - - - name: Assert that the previous task was idempotent - assert: - that: - - " result['changed'] == false" - - - name: Assert that before dicts were correctly generated - assert: - that: - - "{{ merged['after'] == result['before'] }}" - - always: - - include_tasks: _reset_config.yaml diff --git a/test/integration/targets/exos_lldp_global/tests/httpapi/replaced.yaml b/test/integration/targets/exos_lldp_global/tests/httpapi/replaced.yaml deleted file mode 100644 index 595147b9eb..0000000000 --- a/test/integration/targets/exos_lldp_global/tests/httpapi/replaced.yaml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- debug: - msg: "START exos_lldp_global replaced integration tests on connection={{ ansible_connection }}" - -- include_tasks: _reset_config.yaml - -- include_tasks: _populate_config.yaml - -- block: - - name: Replace device configurations of LLDP service with provided configurations - exos_lldp_global: &replaced - config: - interval: 20 - tlv_select: - system_name: false - system_description: true - system_capabilities: false - state: replaced - register: result - - - name: Assert that correct set of results were generated - assert: - that: - - "{{ replaced['requests'][0]['method'] == result['requests'][0]['method'] }}" - - "{{ replaced['requests'][0]['path'] == result['requests'][0]['path'] }}" - - "{{ replaced['requests'][0]['data'] == result['requests'][0]['data'] }}" - - - name: Assert that before dicts are correctly generated - assert: - that: - - "{{ populate == result['before'] }}" - - - name: Assert that after dict is correctly generated - assert: - that: - - "{{ replaced['after'] == result['after'] }}" - - - name: Replace device configurations of LLDP service with provided configurations (IDEMPOTENT) - exos_lldp_global: *replaced - register: result - - - name: Assert that task was idempotent - assert: - that: - - "result['changed'] == false" - - - name: Assert that before dict is correctly generated - assert: - that: - - "{{ replaced['after'] == result['before'] }}" - - always: - - include_tasks: _reset_config.yaml diff --git a/test/integration/targets/exos_lldp_global/vars/main.yaml b/test/integration/targets/exos_lldp_global/vars/main.yaml deleted file mode 100644 index cdcca8074b..0000000000 --- a/test/integration/targets/exos_lldp_global/vars/main.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -merged: - before: - interval: 30 - tlv_select: - system_name: true - system_description: true - system_capabilities: false - port_description: false - management_address: false - - requests: - # 'suppress-tlv-advertisement' list is sorted to compare test - - data: '{"openconfig-lldp:config": {"suppress-tlv-advertisement": ["MANAGEMENT_ADDRESS", "PORT_DESCRIPTION", "SYSTEM_CAPABILITIES", "SYSTEM_DESCRIPTION"], "hello-timer": 10}}' - method: PUT - path: /rest/restconf/data/openconfig-lldp:lldp/config - - after: - interval: 10 - tlv_select: - system_name: true - system_description: false - system_capabilities: false - port_description: false - management_address: false - -populate: - interval: 50 - tlv_select: - system_name: true - system_description: true - system_capabilities: true - port_description: false - management_address: false - -replaced: - requests: - # 'suppress-tlv-advertisement' list is sorted to compare test - - data: '{"openconfig-lldp:config": {"suppress-tlv-advertisement": ["MANAGEMENT_ADDRESS", "PORT_DESCRIPTION", "SYSTEM_CAPABILITIES", "SYSTEM_NAME"], "hello-timer": 20}}' - method: PUT - path: /rest/restconf/data/openconfig-lldp:lldp/config - - after: - interval: 20 - tlv_select: - system_name: false - system_description: true - system_capabilities: false - port_description: false - management_address: false - -deleted: - before: - interval: 50 - tlv_select: - system_name: true - system_description: true - system_capabilities: true - port_description: false - management_address: false - - requests: - # 'suppress-tlv-advertisement' list is sorted to compare test - - data: '{"openconfig-lldp:config": {"suppress-tlv-advertisement": ["MANAGEMENT_ADDRESS", "PORT_DESCRIPTION", "SYSTEM_CAPABILITIES"], "hello-timer": 30}}' - method: PUT - path: /rest/restconf/data/openconfig-lldp:lldp/config - - - after: - interval: 30 - tlv_select: - system_name: true - system_description: true - system_capabilities: false - port_description: false - management_address: false - -round_trip: - interval: 30 - tlv_select: - system_name: true - system_description: true - system_capabilities: false - port_description: false - management_address: false |