summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_lldp/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_lldp/tests')
-rw-r--r--tests/integration/targets/vyos_lldp/tests/cli/basic.yaml16
-rw-r--r--tests/integration/targets/vyos_lldp/tests/cli/net_lldp.yaml9
2 files changed, 11 insertions, 14 deletions
diff --git a/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml b/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml
index badd3a9..b108bbf 100644
--- a/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml
+++ b/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml
@@ -6,39 +6,39 @@
lines: delete service lldp
- name: Enable LLDP service
+ register: result
vyos.vyos.vyos_lldp:
state: present
- register: result
- assert:
that:
- - 'result.changed == true'
+ - result.changed == true
- '"set service lldp" in result.commands'
- name: Enable LLDP service again (idempotent)
+ register: result
vyos.vyos.vyos_lldp:
state: present
- register: result
- assert:
that:
- - 'result.changed == false'
+ - result.changed == false
- name: Disable LLDP service
+ register: result
vyos.vyos.vyos_lldp:
state: absent
- register: result
- assert:
that:
- - 'result.changed == true'
+ - result.changed == true
- '"delete service lldp" in result.commands'
- name:
+ register: result
vyos.vyos.vyos_lldp:
state: absent
- register: result
- assert:
that:
- - 'result.changed == false'
+ - result.changed == false
diff --git a/tests/integration/targets/vyos_lldp/tests/cli/net_lldp.yaml b/tests/integration/targets/vyos_lldp/tests/cli/net_lldp.yaml
index e68d5a6..d19b126 100644
--- a/tests/integration/targets/vyos_lldp/tests/cli/net_lldp.yaml
+++ b/tests/integration/targets/vyos_lldp/tests/cli/net_lldp.yaml
@@ -1,21 +1,18 @@
---
- debug: msg="START vyos cli/net_lldp.yaml on connection={{ ansible_connection }}"
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
- name: Make sure LLDP is not running - setup
vyos.vyos.vyos_config:
lines: delete service lldp
- name: Enable LLDP service using platform agnostic module
- net_lldp:
- state: present
register: result
+ ansible.netcommon.net_lldp:
+ state: present
- assert:
that:
- - 'result.changed == true'
+ - result.changed == true
- '"set service lldp" in result.commands'
- name: Make sure LLDP is not running - teardown