summaryrefslogtreecommitdiff
path: root/tests/integration/targets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets')
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml36
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml25
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml36
3 files changed, 97 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 0000000..50f6d97
--- /dev/null
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,36 @@
+---
+- debug:
+ msg: "START vyos_lag_interfaces empty_config integration tests on connection={{ ansible_connection }}"
+
+- name: Merged with empty config should give appropriate error message
+ vyos.vyos.vyos_lag_interfaces:
+ config:
+ state: merged
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ vyos.vyos.vyos_lag_interfaces:
+ config:
+ state: replaced
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ vyos.vyos.vyos_lag_interfaces:
+ config:
+ state: overridden
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state overridden'
diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml
new file mode 100644
index 0000000..2497015
--- /dev/null
+++ b/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml
@@ -0,0 +1,25 @@
+---
+- debug:
+ msg: "START vyos_lldp_global empty_config integration tests on connection={{ ansible_connection }}"
+
+- name: Merged with empty config should give appropriate error message
+ vyos.vyos.vyos_lldp_global:
+ config:
+ state: merged
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ vyos.vyos.vyos_lldp_global:
+ config:
+ state: replaced
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state replaced'
diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 0000000..9711791
--- /dev/null
+++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,36 @@
+---
+- debug:
+ msg: "START vyos_lldp_interfaces empty_config integration tests on connection={{ ansible_connection }}"
+
+- name: Merged with empty config should give appropriate error message
+ vyos.vyos.vyos_lldp_interfaces:
+ config:
+ state: merged
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ vyos.vyos.vyos_lldp_interfaces:
+ config:
+ state: replaced
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ vyos.vyos.vyos_lldp_interfaces:
+ config:
+ state: overridden
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.msg == 'config is required for state overridden'