summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_snmp_user
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/nxos_snmp_user')
-rw-r--r--test/integration/targets/nxos_snmp_user/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_user/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_user/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_user/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml107
6 files changed, 0 insertions, 172 deletions
diff --git a/test/integration/targets/nxos_snmp_user/defaults/main.yaml b/test/integration/targets/nxos_snmp_user/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_user/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_user/meta/main.yml b/test/integration/targets/nxos_snmp_user/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_user/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_user/tasks/cli.yaml b/test/integration/targets/nxos_snmp_user/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_user/tasks/cli.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 cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_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_snmp_user/tasks/main.yaml b/test/integration/targets/nxos_snmp_user/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_snmp_user/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_user/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_snmp_user/tests/common/sanity.yaml b/test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml
deleted file mode 100644
index ae09a4d071..0000000000
--- a/test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml
+++ /dev/null
@@ -1,107 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_user sanity test"
-
-- set_fact: delete_last_user_allowed='true'
-- set_fact: delete_last_user_allowed='false'
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-- set_fact: delete_last_user_allowed='false'
- when: platform is search('N5K|N6K|N9K-F')
-
-- name: Remove snmp user
- nxos_snmp_user: &remove_snmp_user
- user: ntc
- state: absent
- ignore_errors: yes
- when: platform is not search('N5K|N6K|N9K-F')
-
-- name: Remove user workaround
- # Some platforms will not allow snmp_user to remove the last role
- nxos_user: &workaround_remove_user
- name: ntc
- state: absent
- ignore_errors: yes
- when: platform is search('N5K|N6K|N9K-F')
-
-- pause:
- seconds: 5
-
-- block:
- - name: Create snmp user
- nxos_snmp_user: &create
- user: ntc
- group: network-operator
- authentication: md5
- pwd: N$tOpe%1
- privacy: HelloU$er1
- encrypt: true
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Add another group to user
- nxos_snmp_user: &chg
- user: ntc
- group: network-admin
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_snmp_user: *chg
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Remove group from user
- nxos_snmp_user: &remg
- user: ntc
- group: network-admin
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 5
-
- - name: "Check Idempotence"
- nxos_snmp_user: *remg
- register: result
-
- - assert: *false
-
- - block:
- # Some platforms will not allow snmp_user to remove the last role
- - name: delete snmp user
- nxos_snmp_user: &remove1
- user: ntc
- group: network-operator
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 5
-
- - name: "Remove Idempotence"
- nxos_snmp_user: *remove1
- register: result
-
- - assert: *false
- when: delete_last_user_allowed
-
- always:
- - name: delete snmp user
- nxos_snmp_user: *remove_snmp_user
- when: platform is not search('N5K|N6K|N9K-F')
-
- - name: remove user workaround
- nxos_user: *workaround_remove_user
- when: platform is search('N5K|N6K|N9K-F')
-
-- debug: msg="END connection={{ ansible_connection }} nxos_snmp_user sanity test"