summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_banner
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/nxos_banner')
-rw-r--r--test/integration/targets/nxos_banner/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_banner/meta/main.yaml2
-rw-r--r--test/integration/targets/nxos_banner/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_banner/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_banner/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_banner/tests/common/sanity.yaml84
6 files changed, 0 insertions, 146 deletions
diff --git a/test/integration/targets/nxos_banner/defaults/main.yaml b/test/integration/targets/nxos_banner/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_banner/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_banner/meta/main.yaml b/test/integration/targets/nxos_banner/meta/main.yaml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_banner/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_banner/tasks/cli.yaml b/test/integration/targets/nxos_banner/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_banner/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_banner/tasks/main.yaml b/test/integration/targets/nxos_banner/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_banner/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_banner/tasks/nxapi.yaml b/test/integration/targets/nxos_banner/tasks/nxapi.yaml
deleted file mode 100644
index a37ed6d358..0000000000
--- a/test/integration/targets/nxos_banner/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 \ No newline at end of file
diff --git a/test/integration/targets/nxos_banner/tests/common/sanity.yaml b/test/integration/targets/nxos_banner/tests/common/sanity.yaml
deleted file mode 100644
index ab1eef835b..0000000000
--- a/test/integration/targets/nxos_banner/tests/common/sanity.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_banner sanity test"
-
-- set_fact: banner_exec_image_ok
- # N5K/N6K/N9K-F support banner exec but have image defects
- when: platform is search("N7K|N3K-F")
-
-- set_fact: banner_motd_image_ok
- # multiline banner issues
- when: imagetag is not search("I7") and ansible_connection != "httpapi"
-
-
-# banner exec tests
-- block:
- - debug: msg="START nxos_banner exec tests"
- - name: setup exec
- nxos_banner: &remove_exec
- banner: exec
- state: absent
-
- - name: Set exec
- nxos_banner: &exec
- banner: exec
- text: |
- this is my exec banner
- that has a multiline
- string
- state: present
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'banner exec @\nthis is my exec banner\nthat has a multiline\nstring\n@' in result.commands"
-
- - name: Set exec again (idempotent)
- nxos_banner: *exec
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
- - name: teardown exec
- nxos_banner: *remove_exec
-
- when: banner_exec_image_ok is defined
-
-# banner motd tests
-- block:
- - name: setup motd
- nxos_banner: &remove_motd
- banner: motd
- state: absent
-
- - name: Set motd
- nxos_banner: &motd
- banner: motd
- text: |
- Junk motd banner
- over multiple lines
- state: present
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'banner motd @\nJunk motd banner\nover multiple lines\n@' in result.commands"
-
- - name: Set motd again (idempotent)
- nxos_banner: *motd
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: teardown motd
- nxos_banner: *remove_motd
-
- when: banner_motd_image_ok is defined
-
-- debug: msg="END connection={{ ansible_connection }} nxos_banner sanity test"