summaryrefslogtreecommitdiff
path: root/test/integration/targets/ios_lldp_global
diff options
context:
space:
mode:
authorAnsible Core Team <info@ansible.com>2020-03-09 09:40:34 +0000
committerAnsible Core Team <info@ansible.com>2020-03-09 09:40:34 +0000
commit44ce3f381254b913bff1c735a2829003f5c240f9 (patch)
tree4ffffd9e84c1ba29943e8a65943af8a4db45c423 /test/integration/targets/ios_lldp_global
parent83c7ad1886999030ed55abb0f2201e8a08124b12 (diff)
downloadansible-44ce3f381254b913bff1c735a2829003f5c240f9.tar.gz
Migrated to cisco.ios
Diffstat (limited to 'test/integration/targets/ios_lldp_global')
-rw-r--r--test/integration/targets/ios_lldp_global/aliases1
-rw-r--r--test/integration/targets/ios_lldp_global/defaults/main.yaml3
-rw-r--r--test/integration/targets/ios_lldp_global/meta/main.yaml1
-rw-r--r--test/integration/targets/ios_lldp_global/tasks/cli.yaml21
-rw-r--r--test/integration/targets/ios_lldp_global/tasks/main.yaml2
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml10
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml10
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml40
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml25
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/merged.yaml43
-rw-r--r--test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml43
-rw-r--r--test/integration/targets/ios_lldp_global/vars/main.yaml47
12 files changed, 0 insertions, 246 deletions
diff --git a/test/integration/targets/ios_lldp_global/aliases b/test/integration/targets/ios_lldp_global/aliases
deleted file mode 100644
index 6bb69158a7..0000000000
--- a/test/integration/targets/ios_lldp_global/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/ios/group1
diff --git a/test/integration/targets/ios_lldp_global/defaults/main.yaml b/test/integration/targets/ios_lldp_global/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/ios_lldp_global/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/ios_lldp_global/meta/main.yaml b/test/integration/targets/ios_lldp_global/meta/main.yaml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/ios_lldp_global/meta/main.yaml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/ios_lldp_global/tasks/cli.yaml b/test/integration/targets/ios_lldp_global/tasks/cli.yaml
deleted file mode 100644
index 242420aa7f..0000000000
--- a/test/integration/targets/ios_lldp_global/tasks/cli.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- 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 }}"
- delegate_to: localhost
-
-- name: Run test case (connection=network_cli)
- include: "{{ test_case_to_run }}"
- vars:
- ansible_connection: network_cli
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: connection_network_cli
diff --git a/test/integration/targets/ios_lldp_global/tasks/main.yaml b/test/integration/targets/ios_lldp_global/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/ios_lldp_global/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml b/test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml
deleted file mode 100644
index 6bea3dcf21..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: Populate Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- lldp holdtime 10
- lldp run
- lldp timer 100
- lldp reinit 3
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml b/test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml
deleted file mode 100644
index 1098845c79..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: Remove Config
- cli_config:
- config: "{{ lines }}"
- vars:
- lines: |
- no lldp holdtime
- no lldp run
- no lldp timer
- no lldp reinit
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml b/test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml
deleted file mode 100644
index cc6e24dee9..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug:
- msg: "Start Deleted integration state for ios_lldp_global ansible_connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Delete configured Global LLDP
- ios_lldp_global: &deleted
- state: deleted
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ deleted['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ deleted['before'] == result['before'] }}"
-
- - name: Delete configured Global LLDP (IDEMPOTENT)
- ios_lldp_global: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml b/test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml
deleted file mode 100644
index b8cc397152..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- debug:
- msg: "START ios_lldp_global empty_config.yaml integration tests on connection={{ ansible_connection }}"
-
-- name: Merged with empty config should give appropriate error message
- ios_lldp_global:
- config:
- state: merged
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state merged'
-
-- name: Replaced with empty config should give appropriate error message
- ios_lldp_global:
- config:
- state: replaced
- register: result
- ignore_errors: True
-
-- assert:
- that:
- - result.msg == 'value of config parameter must not be empty for state replaced'
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml b/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml
deleted file mode 100644
index 00757ecfac..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "START Merged ios_lldp_global state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- block:
- - name: Merge provided configuration Global LLDP
- ios_lldp_global: &merged
- config:
- holdtime: 10
- enabled: True
- reinit: 3
- timer: 20
- state: merged
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ merged['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ merged['before'] == result['before'] }}"
-
- - name: Merge provided configuration Global LLDP (IDEMPOTENT)
- ios_lldp_global: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml b/test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml
deleted file mode 100644
index 892b5dbc34..0000000000
--- a/test/integration/targets/ios_lldp_global/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "START Replaced ios_lldp_global state for integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- include_tasks: _populate_config.yaml
-
-- block:
- - name: Replaces Global LLDP configuration with provided LLDP configuration
- ios_lldp_global: &replaced
- config:
- holdtime: 20
- reinit: 5
- state: replaced
- register: result
-
- - name: Assert that correct set of commands were generated
- assert:
- that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) | length == 0 }}"
-
- - name: Assert that before dicts are correctly generated
- assert:
- that:
- - "{{ replaced['before'] == result['before'] }}"
-
- - name: Assert that after dict is correctly generated
- assert:
- that:
- - "{{ replaced['before'] == result['before'] }}"
-
- - name: Replaces Global LLDP configuration with provided LLDP configuration (IDEMPOTENT)
- ios_lldp_global: *replaced
- register: result
-
- - name: Assert that task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/ios_lldp_global/vars/main.yaml b/test/integration/targets/ios_lldp_global/vars/main.yaml
deleted file mode 100644
index ed87644bf8..0000000000
--- a/test/integration/targets/ios_lldp_global/vars/main.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-merged:
- before: {}
-
- commands:
- - "lldp holdtime 10"
- - "lldp run"
- - "lldp timer 20"
- - "lldp reinit 3"
-
- after:
- timer: 20
- holdtime: 10
- reinit: 3
- enabled: True
-
-replaced:
- before:
- timer: 100
- holdtime: 10
- reinit: 3
- enabled: True
-
- commands:
- - "no lldp run"
- - "no lldp timer"
- - "lldp holdtime 20"
- - "lldp reinit 5"
-
- after:
- holdtime: 10
- reinit: 3
-
-deleted:
- before:
- timer: 100
- holdtime: 10
- reinit: 3
- enabled: True
-
- commands:
- - "no lldp holdtime"
- - "no lldp run"
- - "no lldp timer"
- - "no lldp reinit"
-
- after: {}