diff options
Diffstat (limited to 'test/integration/targets/iosxr_banner')
11 files changed, 0 insertions, 303 deletions
diff --git a/test/integration/targets/iosxr_banner/defaults/main.yaml b/test/integration/targets/iosxr_banner/defaults/main.yaml deleted file mode 100644 index 9ef5ba5165..0000000000 --- a/test/integration/targets/iosxr_banner/defaults/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -testcase: "*" -test_items: [] diff --git a/test/integration/targets/iosxr_banner/meta/main.yaml b/test/integration/targets/iosxr_banner/meta/main.yaml deleted file mode 100644 index d4da833dd5..0000000000 --- a/test/integration/targets/iosxr_banner/meta/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - prepare_iosxr_tests diff --git a/test/integration/targets/iosxr_banner/tasks/cli.yaml b/test/integration/targets/iosxr_banner/tasks/cli.yaml deleted file mode 100644 index 3f93a4f369..0000000000 --- a/test/integration/targets/iosxr_banner/tasks/cli.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: collect all cli test cases - find: - paths: "{{ role_path }}/tests/cli" - patterns: "{{ testcase }}.yaml" - 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=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/iosxr_banner/tasks/main.yaml b/test/integration/targets/iosxr_banner/tasks/main.yaml deleted file mode 100644 index af08869c92..0000000000 --- a/test/integration/targets/iosxr_banner/tasks/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- { include: cli.yaml, tags: ['cli'] } -- { include: netconf.yaml, tags: ['netconf'] } diff --git a/test/integration/targets/iosxr_banner/tasks/netconf.yaml b/test/integration/targets/iosxr_banner/tasks/netconf.yaml deleted file mode 100644 index 904db03205..0000000000 --- a/test/integration/targets/iosxr_banner/tasks/netconf.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: collect all netconf test cases - find: - paths: "{{ role_path }}/tests/netconf" - patterns: "{{ testcase }}.yaml" - register: test_cases - delegate_to: localhost - -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - -- name: run test cases (connection=netconf) - include: "{{ test_case_to_run }} ansible_connection=netconf" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run - -# Only one of the Testcase would be run to check if `connection: local` -# is established. Full suite is run with `connection:network_cli` or `connection:netconf` -- name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local" - with_first_found: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/iosxr_banner/tests/cli/basic-login.yaml b/test/integration/targets/iosxr_banner/tests/cli/basic-login.yaml deleted file mode 100644 index 032fa1f4ea..0000000000 --- a/test/integration/targets/iosxr_banner/tests/cli/basic-login.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -- name: setup - remove login - iosxr_banner: - banner: login - provider: "{{ cli }}" - state: absent - -- name: Set login - iosxr_banner: - banner: login - text: | - this is my login banner - that has a multiline - string - provider: "{{ cli }}" - state: present - register: result - -- debug: - msg: "{{ result }}" - -- assert: - that: - - "result.changed == true" - - "'this is my login banner' in result.commands[0]" - - "'that has a multiline' in result.commands[0]" - -- name: Set login again (idempotent) - iosxr_banner: - banner: login - text: | - this is my login banner - that has a multiline - string - provider: "{{ cli }}" - state: present - register: result - -- assert: - that: - - "result.changed == false" - - "result.commands | length == 0" - - -# FIXME add in tests for everything defined in docs -# FIXME Test state:absent + test: -# FIXME Without powers ensure "privileged mode required" diff --git a/test/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml b/test/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml deleted file mode 100644 index 67b80eb023..0000000000 --- a/test/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -- name: setup - remove motd - iosxr_banner: - banner: motd - state: absent - provider: "{{ cli }}" - -- name: Set motd - iosxr_banner: - banner: motd - text: | - this is my motd banner - that has a multiline - string - provider: "{{ cli }}" - state: present - register: result - -- debug: - msg: "{{ result }}" - -- assert: - that: - - "result.changed == true" - - "'this is my motd banner' in result.commands[0]" - - "'that has a multiline' in result.commands[0]" - -- name: Set motd again (idempotent) - iosxr_banner: - banner: motd - text: | - this is my motd banner - that has a multiline - string - provider: "{{ cli }}" - state: present - register: result - -- assert: - that: - - "result.changed == false" - - "result.commands | length == 0" - - -# FIXME add in tests for everything defined in docs -# FIXME Test state:absent + test: -# FIXME Without powers ensure "privileged mode required" diff --git a/test/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml b/test/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml deleted file mode 100644 index 539baf23f5..0000000000 --- a/test/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -- name: Setup - iosxr_banner: - banner: login - text: | - Junk login banner - over multiple lines - provider: "{{ cli }}" - state: present - -- name: remove login - iosxr_banner: - banner: login - state: absent - provider: "{{ cli }}" - register: result - -- debug: - msg: "{{ result }}" - -- assert: - that: - - "result.changed == true" - - "'no banner login' in result.commands[0]" - -- name: remove login (idempotent) - iosxr_banner: - banner: login - state: absent - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.commands | length == 0" - - -# FIXME add in tests for everything defined in docs -# FIXME Test state:absent + test: -# FIXME Without powers ensure "privileged mode required" diff --git a/test/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml b/test/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml deleted file mode 100644 index 4335d59827..0000000000 --- a/test/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: setup - remove login - iosxr_banner: - banner: login - provider: "{{ netconf }}" - state: absent - -- name: Set login - iosxr_banner: - banner: login - text: | - this is my login banner - that has a multiline - string - provider: "{{ netconf }}" - state: present - register: result - -- debug: - msg: "{{ result }}" - -- assert: - that: - - "result.changed == true" - - "'this is my login banner' in result.xml" - - "'that has a multiline' in result.xml" - -- name: Set login again (idempotent) - iosxr_banner: - banner: login - text: | - this is my login banner - that has a multiline - string - provider: "{{ netconf }}" - state: present - register: result - -- assert: - that: - - "result.changed == false" - - "result.xml | length == 0" diff --git a/test/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml b/test/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml deleted file mode 100644 index 49969dd616..0000000000 --- a/test/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: setup - remove motd - iosxr_banner: - banner: motd - state: absent - provider: "{{ netconf }}" - -- name: Set motd - iosxr_banner: - banner: motd - text: | - this is my motd banner - that has a multiline - string - provider: "{{ netconf }}" - state: present - register: result - -- debug: - msg: "{{ result }}" - -- assert: - that: - - "result.changed == true" - - "'this is my motd banner' in result.xml" - - "'that has a multiline' in result.xml" - -- name: Set motd again (idempotent) - iosxr_banner: - banner: motd - text: | - this is my motd banner - that has a multiline - string - provider: "{{ netconf }}" - state: present - register: result - -- assert: - that: - - "result.changed == false" - - "result.xml | length == 0" diff --git a/test/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml b/test/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml deleted file mode 100644 index c8bb8f1616..0000000000 --- a/test/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- name: Setup - iosxr_banner: - banner: login - text: | - Junk login banner - over multiple lines - provider: "{{ netconf }}" - state: present - -- name: remove login - iosxr_banner: - banner: login - state: absent - provider: "{{ netconf }}" - register: result - -- debug: - msg: "{{ result }}" - -- assert: - that: - - "result.changed == true" - - "'xc:operation=\"delete\"' in result.xml" - -- name: remove login (idempotent) - iosxr_banner: - banner: login - state: absent - provider: "{{ netconf }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.xml | length == 0" |