summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorGomathiselviS <gomathiselvi@gmail.com>2020-08-10 11:13:45 -0400
committerGitHub <noreply@github.com>2020-08-10 15:13:45 +0000
commita69b936ac650fee178a5c07c74db6aeea739267a (patch)
treeb23d6462eb2ef7e6cfd72c430354beda5a836770 /tests/integration
parentf88b875dd9377951b973cdfe871f7dd4a19b09f1 (diff)
downloadvyos-ansible-old-a69b936ac650fee178a5c07c74db6aeea739267a.tar.gz
vyos-ansible-old-a69b936ac650fee178a5c07c74db6aeea739267a.zip
vyos_interface : refactor testcases (#71)
vyos_interface : refactor testcases Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/targets/vyos_interface/tests/cli/intent.yaml162
1 files changed, 0 insertions, 162 deletions
diff --git a/tests/integration/targets/vyos_interface/tests/cli/intent.yaml b/tests/integration/targets/vyos_interface/tests/cli/intent.yaml
deleted file mode 100644
index e3245d3..0000000
--- a/tests/integration/targets/vyos_interface/tests/cli/intent.yaml
+++ /dev/null
@@ -1,162 +0,0 @@
----
-- debug: msg="START cli/intent.yaml on connection={{ ansible_connection }}"
-
-- name: Detect if we have existing lldp neighbors configured
- register: neighbors_out
- vyos.vyos.vyos_command:
- commands:
- - show lldp neighbors detail
-
-
-# setting a variable dynamically using set_fact isn't working in devel.
-# - name: Should we run lldp tests?
-# set_fact:
-# run_lldp_tests: "'PortDescr: eth0' in neighbors_out.stdout[0]"
-
-- name: Enable LLDP service
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
- vyos.vyos.vyos_lldp:
- state: present
-
-- name: Create LLDP configuration
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: present
-
-- name: Setup (interface is up)
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- enabled: true
- state: present
-
-- name: Check intent arguments
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- state: up
-
-- assert:
- that:
- - result.failed == false
-
-- name: Check lldp neighbors intent arguments
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
- register: result
- vyos.vyos.vyos_interface:
- name: eth0
- neighbors:
-
- - port: eth0
-
-- assert:
- that:
- - result.failed == false
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
-
-- name: Check intent arguments (failed condition)
- ignore_errors: true
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- state: down
-
-- assert:
- that:
- - result.failed == true
- - "'state eq(down)' in result.failed_conditions"
-
-- name: Check lldp neighbors intent arguments (failed)
- ignore_errors: true
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
- register: result
- vyos.vyos.vyos_interface:
- name: eth0
- neighbors:
-
- - port: dummy_port
- host: dummy_host
-
-- assert:
- that:
- - result.failed == true
- - "'host dummy_host' in result.failed_conditions"
- - "'port dummy_port' in result.failed_conditions"
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
-
-- name: Config + intent
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- enabled: false
- state: down
-
-- assert:
- that:
- - result.failed == false
-
-- name: Config + intent (fail)
- ignore_errors: true
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- enabled: false
- state: up
-
-- assert:
- that:
- - result.failed == true
- - "'state eq(up)' in result.failed_conditions"
-
-- name: Aggregate config + intent (pass)
- ignore_errors: true
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
- enabled: true
- state: up
-
-- assert:
- that:
- - result.failed == false
-
-- name: Check lldp neighbors intent aggregate arguments
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth0
- neighbors:
-
- - port: eth0
-
-- assert:
- that:
- - result.failed == false
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
-
-- name: Check lldp neighbors intent aggregate arguments (failed)
- ignore_errors: true
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth0
- neighbors:
-
- - port: eth0
-
- - port: dummy_port
- host: dummy_host
-
-- assert:
- that:
- - result.failed == true
- - "'host dummy_host' in result.failed_conditions"
- - "'port dummy_port' in result.failed_conditions"
- when: "'PortDescr: eth0' in neighbors_out.stdout[0]"