summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_vlans
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/nxos_vlans')
-rw-r--r--test/integration/targets/nxos_vlans/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vlans/meta/main.yml1
-rw-r--r--test/integration/targets/nxos_vlans/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_vlans/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_vlans/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/deleted.yaml48
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/merged.yaml55
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/overridden.yaml65
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/replaced.yaml62
9 files changed, 0 insertions, 282 deletions
diff --git a/test/integration/targets/nxos_vlans/defaults/main.yaml b/test/integration/targets/nxos_vlans/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vlans/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vlans/meta/main.yml b/test/integration/targets/nxos_vlans/meta/main.yml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/nxos_vlans/meta/main.yml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/nxos_vlans/tasks/cli.yaml b/test/integration/targets/nxos_vlans/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_vlans/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vlans/tasks/main.yaml b/test/integration/targets/nxos_vlans/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_vlans/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_vlans/tasks/nxapi.yaml b/test/integration/targets/nxos_vlans/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vlans/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vlans/tests/cli/deleted.yaml b/test/integration/targets/nxos_vlans/tests/cli/deleted.yaml
deleted file mode 100644
index e3e8de7d06..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans deleted integration tests connection={{ ansible_connection }}"
-
-- name: setup
- cli_config:
- config: |
- no vlan 2-100
- vlan 5
- vlan 6
-
-- block:
- - name: Gather vlans facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - name: deleted
- nxos_vlans: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.vlans|length - 1)"
- - "result.after|length == 0"
- - "result.changed == true"
- - "'no vlan 5' in result.commands"
- - "'no vlan 6' in result.commands"
- - "result.commands|length == 2"
-
- - name: Idempotence - deleted
- nxos_vlans: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config:
- config: |
- no vlan 5
- no vlan 6
diff --git a/test/integration/targets/nxos_vlans/tests/cli/merged.yaml b/test/integration/targets/nxos_vlans/tests/cli/merged.yaml
deleted file mode 100644
index 88000fbca7..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/merged.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans merged integration tests connection={{ ansible_connection }}"
-
-- name: setup
- cli_config: &cleanup
- config: |
- no vlan 2-100
-
-- block:
- - name: Merged
- nxos_vlans: &merged
- config:
- - vlan_id: 5
- name: vlan5
- - vlan_id: 6
- name: vlan6
- state: suspend
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == 0"
- - "'vlan 5' in result.commands"
- - "'name vlan5' in result.commands"
- - "'vlan 6' in result.commands"
- - "'name vlan6' in result.commands"
- - "'state suspend' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather vlans facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.vlans|length - 1)"
-
- - name: Idempotence - Merged
- nxos_vlans: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_vlans/tests/cli/overridden.yaml b/test/integration/targets/nxos_vlans/tests/cli/overridden.yaml
deleted file mode 100644
index ad0760ea4a..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans overridden integration tests connection={{ ansible_connection }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no vlan 2-100
-
-- block:
- - name: setup
- cli_config:
- config: |
- vlan 5
- name test-vlan5
- state suspend
- vlan 6
- exit
-
- - name: Gather vlans facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - name: Overridden
- nxos_vlans: &overridden
- config:
- - vlan_id: 9
- name: test-vlan9
- enabled: false
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.vlans|length - 1)"
- - "result.changed == true"
- - "'no vlan 5' in result.commands"
- - "'no vlan 6' in result.commands"
- - "'vlan 9' in result.commands"
- - "'name test-vlan9' in result.commands"
- - "'shutdown' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather vlans post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.vlans|length - 1)"
-
- - name: Idempotence - Overridden
- nxos_vlans: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_vlans/tests/cli/replaced.yaml b/test/integration/targets/nxos_vlans/tests/cli/replaced.yaml
deleted file mode 100644
index e55c1dd2e1..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans replaced integration tests connection={{ ansible_connection }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no vlan 2-100
-
-- block:
- - name: setup2
- cli_config:
- config: |
- vlan 5
- name test-vlan5
- vlan 6
- name test-vlan6
- exit
-
- - name: Gather vlans facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - name: Replaced
- nxos_vlans: &replaced
- config:
- - vlan_id: 6
- state: suspend
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.vlans|length - 1)"
- - "result.changed == true"
- - "'vlan 6' in result.commands"
- - "'no name' in result.commands"
- - "'state suspend' in result.commands"
- - "result.commands|length == 3"
-
- - name: Gather vlans post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.vlans|length - 1)"
-
- - name: Idempotence - Replaced
- nxos_vlans: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup