From 447598ada0da54d91cb563a679cfe261158bd7cd Mon Sep 17 00:00:00 2001 From: CaptTrews Date: Wed, 18 Sep 2019 18:01:08 +0000 Subject: Updated from network content collector Signed-off-by: CaptTrews --- .../tests/cli/empty_config.yaml | 36 ++++++++++++++++++++++ .../vyos_lldp_global/tests/cli/empty_config.yaml | 25 +++++++++++++++ .../tests/cli/empty_config.yaml | 36 ++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml create mode 100644 tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml create mode 100644 tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml (limited to 'tests/integration') 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 00000000..50f6d97b --- /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 00000000..2497015d --- /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 00000000..9711791e --- /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' -- cgit v1.2.3